Problem: While resting on the ship after the "Russian Code Cup" a boy named Misha invented an interesting game. He promised to give his quadrocopter to whoever will be the first one to make a rectangular table of size n × m, consisting of positive integers such that the sum of the squares of numbers for each row and each column was also a square.

Since checking the correctness of the table manually is difficult, Misha asks you to make each number in the table to not exceed 108.

Input

The first line contains two integers n and m (1 ≤ n, m ≤ 100) — the size of the table. 

Output

Print the table that meets the condition: n lines containing m integers, separated by spaces. If there are multiple possible answers, you are allowed to print anyone. It is guaranteed that there exists at least one correct answer.

Examples

Input

1 1


Output

1

Input

1 2


Output

3 4

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
bool is(long long x) {
  long long t = sqrt(x) + 0.1;
  return t * t == x;
}
int main() {
  int n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    puts("1");
    return 0;
  }
  if (n == 1 || m == 1) {
    int s = n * m, a, b;
    for (a = 1;; ++a)
      for (b = 1; b <= a; ++b)
        if (is(a * a + b * b + s - 2)) {
          for (int i = 0, k = 0; i < n; ++i)
            for (int j = 0; j < m; ++j, ++k) {
              int x = 1;
              if (k == 0) x = a;
              if (k == 1) x = b;
              printf("%d%c", x, j + 1 < m ? ' ' : '\n');
            }
          return 0;
        }
  }
  for (int a = 1;; ++a) {
    vector<int> bs, cs;
    long long a2 = (long long)a * a;
    for (int b = 1; b <= a * 3; ++b)
      if (is(a2 * (n - 1) + (long long)b * b)) bs.push_back(b);
    for (int c = 1; c <= a * 3; ++c)
      if (is(a2 * (m - 1) + (long long)c * c)) cs.push_back(c);
    for (int b : bs)
      for (int d = 1; d <= b * 2; ++d)
        if (is(b * (long long)b * (m - 1) + d * (long long)d))
          for (int c : cs)
            if ((is(c * (long long)c * (n - 1) + d * (long long)d))) {
              for (int i = 0; i < n; ++i)
                for (int j = 0; j < m; ++j)
                  printf(
                      "%d%c",
                      (i + 1 < n ? (j + 1 < m ? a : c) : (j + 1 < m ? b : d)),
                      j + 1 < m ? ' ' : '\n');
              return 0;
            }
  }
}