#include <iostream>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int main(int argc, char *argv[]) {
int s,d;
printf ("the length of the rectangle
");
scanf ("%d",&s);
printf ("width of the rectangle
");
scanf ("%d",&d);
int l;
int p;
int przekatna;
for (p=1; p<=s; p++)
{
printf ("
");
for (l=1;l<=d; l++)
{
if(p==1 || l==1 || l==d || s==p || p==((d+1)/2) ) printf("*"); else printf(" ");
if ( l==(d)/2 && p!=((d+1)/2) && p!=1 && p!=s)
printf("*"); else printf("");
}
}
return 0;
}