~/algor $ cat problems/matritsa-ramka
Frame
Easy
1000 ms
128 MB
22%
Two positive integers $n$ and $m$ are given. Fill every element on the border of an $n \times m$ matrix (the first and last rows, the first and last columns) with $1$ and the rest with $0$, then print the matrix.
Input
One line with two positive integers: $n$ and $m$.
Output
$n$ lines with $m$ space-separated integers each.
Note
$1 \le n, m \le 200$
Examples
Input #1
3 4
Output #1
1 1 1 1 1 0 0 1 1 1 1 1
Input #2
1 1
Output #2
1