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;
int n, m, N = 1, M = 1;
int a[111];
int b[111][111];
int pcount(int x, int p) {
  int res = 0;
  while (x % p == 0) res++, x /= p;
  return res;
}
int main() {
  cin.tie(0);
  ios_base::sync_with_stdio(0);
  cin >> n >> m;
  a[0] = 10000 << 8;
  while (M < m) {
    if (m - M >= 3) {
      int ind, best = -1;
      for (int i = 0; i < (M); i++) {
        int p = pcount(a[i], 2);
        if (p > best) {
          best = p;
          ind = i;
        }
      }
      a[ind] /= 2;
      a[M] = a[M + 1] = a[M + 2] = a[ind];
      M += 3;
    } else {
      int ind, best = -1;
      for (int i = 0; i < (M); i++) {
        int p = pcount(a[i], 5);
        if (p > best) {
          best = p;
          ind = i;
        }
      }
      int d5 = a[ind] / 5;
      a[ind] = d5 * 3;
      a[M] = d5 * 4;
      M += 1;
    }
  }
  for (int i = 0; i < (M); i++) b[0][i] = a[i];
  while (N < n) {
    if (n - N >= 3) {
      int row, best = -1;
      for (int i = 0; i < (N); i++) {
        int p = 1070000000LL;
        for (int j = 0; j < (M); j++) p = min(p, pcount(b[i][j], 2));
        if (p > best) {
          best = p;
          row = i;
        }
      }
      for (int j = 0; j < (M); j++) {
        b[row][j] /= 2;
        b[N][j] = b[N + 1][j] = b[N + 2][j] = b[row][j];
      }
      N += 3;
    } else {
      int row, best = -1;
      for (int i = 0; i < (N); i++) {
        int p = 1070000000LL;
        for (int j = 0; j < (M); j++) p = min(p, pcount(b[i][j], 5));
        if (p > best) {
          best = p;
          row = i;
        }
      }
      for (int j = 0; j < (M); j++) {
        int d5 = b[row][j] / 5;
        b[row][j] = d5 * 3;
        b[N][j] = d5 * 4;
      }
      N += 1;
    }
  }
  for (int i = 0; i < (N); i++)
    for (int j = 0; j < (M); j++) {
      cout << b[i][j] << " ";
      if (j == M - 1) cout << endl;
    }
}