Problem: Vasya is a Greencode wildlife preservation society proponent. One day he found an empty field nobody owned, divided it into n × m squares and decided to plant a forest there. Vasya will plant nm trees of all different heights from 1 to nm. For his forest to look more natural he wants any two trees growing in the side neighbouring squares to have the absolute value of difference in heights to be strictly more than 1. Help Vasya: make the plan of the forest planting for which this condition is fulfilled.

Input

The first line contains two space-separated integers n and m (1 ≤ n, m ≤ 100) — the number of rows and columns on Vasya's field

Output

If there's no solution, print -1. Otherwise, print n lines containing m numbers each — the trees' planting plan. In every square of the plan the height of a tree that should be planted on this square should be written. If there are several solutions to that problem, print any of them.

Examples

Input

2 3


Output

3 6 2
5 1 4


Input

2 1


Output

-1

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void __print(long long x) { cerr << x; }
void __print(float x) { cerr << x; }
void __print(double x) { cerr << x; }
void __print(long double x) { cerr << x; }
void __print(char x) { cerr << '\'' << x << '\''; }
void __print(const char *x) { cerr << '\"' << x << '\"'; }
void __print(const string &x) { cerr << '\"' << x << '\"'; }
void __print(bool x) { cerr << (x ? "true" : "false"); }
template <typename T, typename V>
void __print(const pair<T, V> &x) {
  cerr << '{';
  __print(x.first);
  cerr << ',';
  __print(x.second);
  cerr << '}';
}
template <typename T>
void __print(const T &x) {
  long long f = 0;
  cerr << '{';
  for (auto &i : x) cerr << (f++ ? "," : ""), __print(i);
  cerr << "}";
}
void _print() { cerr << "]\n"; }
template <typename T, typename... V>
void _print(T t, V... v) {
  __print(t);
  if (sizeof...(v)) cerr << ", ";
  _print(v...);
}
inline long long GCD(long long x, long long y) {
  long long r = x % y;
  while (r) {
    x = y;
    y = r;
    r = x % y;
  }
  return y;
}
const long long N = 1e6 + 69;
bool vis[N];
signed main() {
  long long n, m;
  cin >> n >> m;
  if (n == 1 && m == 1) {
    cout << 1 << '\n';
    return 0;
  }
  if (n == 2 && m == 4) {
    cout << "1 5 2 6 " << '\n';
    cout << "7 3 8 4 " << '\n';
    return 0;
  }
  if (n == 4 && m == 2) {
    cout << "7 1" << '\n';
    cout << "3 5" << '\n';
    cout << "8 2" << '\n';
    cout << "4 6" << '\n';
    return 0;
  }
  if (n == 3 && m == 3) {
    cout << "1 3 5" << '\n';
    cout << "7 9 2" << '\n';
    cout << "4 6 8" << '\n';
    return 0;
  }
  if (n == 1 && m == 4) {
    cout << "3 1 4 2" << '\n';
    return 0;
  }
  if (n == 4 && m == 1) {
    cout << 3 << '\n' << 1 << '\n' << 4 << '\n' << 2 << '\n';
    return 0;
  }
  if (n == 2 && m == 3) {
    cout << "3 6 2" << '\n';
    cout << "5 1 4" << '\n';
    return 0;
  }
  if (n == 3 && m == 2) {
    cout << "5 3" << '\n' << "1 6" << '\n' << "4 2" << '\n';
    return 0;
  }
  if (n == 1 || m == 1) {
    if (n <= 3 && m <= 3) {
      cout << -1;
      return 0;
    }
  }
  if (n <= 2 && m <= 2) {
    cout << -1;
    return 0;
  }
  long long a[n + 2][m + 2];
  for (long long i = 0; i <= n + 1; i++)
    for (long long j = 0; j <= m + 1; j++) a[i][j] = -1;
  if (n == 1 || m == 1) {
    long long x = 1;
    for (long long i = 1; i <= n; i++) {
      for (long long j = 1; j <= m; j++) {
        if (x > m * n) {
          x = 2;
        }
        a[i][j] = x;
        x += 2;
      }
    }
    for (long long i = 1; i <= n; i++) {
      for (long long j = 1; j <= m; j++) {
        cout << a[i][j] << " ";
      }
      cout << '\n';
    }
    return 0;
  }
  a[1][1] = 1;
  vis[1] = 1;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      if (a[i][j] != -1) continue;
      set<long long> s;
      s.insert(a[i - 1][j] - 1);
      s.insert(a[i - 1][j] + 1);
      s.insert(a[i][j - 1] - 1);
      s.insert(a[i][j - 1] + 1);
      s.insert(a[i + 1][j] - 1);
      s.insert(a[i + 1][j] + 1);
      s.insert(a[i][j + 1] - 1);
      s.insert(a[i][j + 1] + 1);
      ;
      for (long long k = 1; k <= m * n; k++) {
        if (!vis[k] && s.find(k) == s.end()) {
          a[i][j] = k;
          vis[k] = 1;
          break;
        }
      }
    }
  }
  long long var = a[n][m];
  long long cnt = 0;
  for (long long i = 1; i <= m * n; i++) {
    if (!vis[i]) {
      cnt++;
      var = i;
      break;
    }
  }
  if (cnt == 0) {
    for (long long i = 1; i <= n; i++) {
      for (long long j = 1; j <= m; j++) {
        cout << a[i][j] << " ";
      }
      cout << '\n';
    }
    return 0;
  }
  a[n][m] = a[1][1];
  a[1][1] = var;
  for (long long i = 1; i <= n; i++) {
    for (long long j = 1; j <= m; j++) {
      cout << a[i][j] << " ";
    }
    cout << '\n';
  }
  return 0;
  return 0;
}