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;
const int inf = 0x7fffffff;
const long long INF = 0x7fffffffffffffff;
template <typename A, typename B>
ostream &operator<<(ostream &s, const pair<A, B> &p) {
  return s << "(" << p.first << "," << p.second << ")";
}
template <typename T>
ostream &operator<<(ostream &s, const vector<T> &c) {
  s << "[ ";
  for (auto it : c) s << it << " ";
  s << "]";
  return s;
}
template <typename T>
ostream &operator<<(ostream &o, const set<T> &st) {
  o << "{";
  for (auto it = st.begin(); it != st.end(); it++)
    o << (it == st.begin() ? "" : ", ") << *it;
  return o << "}";
}
template <typename T1, typename T2>
ostream &operator<<(ostream &o, const map<T1, T2> &make_pair) {
  o << "{";
  for (auto it = make_pair.begin(); it != make_pair.end(); it++) {
    o << (it == make_pair.begin() ? "" : ", ") << it->first << ":"
      << it->second;
  }
  o << "}";
  return o;
}
int n, m;
int ans[104][104];
int A[104 * 104];
bool filled[104][104];
const int dx[] = {1, 0, 0, -1};
const int dy[] = {0, 1, -1, 0};
bool in(int r, int c) { return r >= 0 && r < n && c >= 0 && c < m; }
void _fill(int &c) {
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < n; j++)
      if (!filled[i][j]) {
        bool valid = true;
        for (int k = 0; k < 4; k++) {
          int nx = i + dx[k];
          int ny = j + dy[k];
          if (in(nx, ny) && ans[nx][ny] == c - 1) {
            valid = false;
            break;
          }
        }
        if (valid) {
          filled[i][j] = true, ans[i][j] = c++;
          return;
        }
      }
  }
}
int main() {
  cin >> n >> m;
  if (n + m == 2)
    puts("1");
  else if (n + m == 3 || n + m == 4)
    puts("-1");
  else {
    memset(filled, (false), sizeof(filled));
    ;
    if (n > 1 && m > 1)
      ans[1][1] = 1, filled[1][1] = true;
    else if (n == 1)
      ans[0][1] = 1, filled[0][1] = true;
    else if (m == 1)
      ans[1][0] = 1, filled[1][0] = true;
    bool flag = n > 1 && m > 1;
    int cur = 2;
    for (int i = 0; i < n; i++) {
      if (flag) {
        for (int j = 0; j < m; j += 2)
          if (!filled[i][j]) ans[i][j] = cur, cur++, filled[i][j] = true;
        flag ^= 1;
      } else {
        for (int j = 1; j < m; j += 2)
          if (!filled[i][j]) ans[i][j] = cur, cur++, filled[i][j] = true;
        flag ^= 1;
      }
    }
    flag = !(n > 1 && m > 1);
    _fill(cur);
    for (int i = 0; i < n; i++) {
      if (flag) {
        for (int j = 0; j < m; j += 2)
          if (!filled[i][j]) ans[i][j] = cur, cur++, filled[i][j] = true;
        flag ^= 1;
      } else {
        for (int j = 1; j < m; j += 2)
          if (!filled[i][j]) ans[i][j] = cur, cur++, filled[i][j] = true;
        flag ^= 1;
      }
    }
    for (int i = 0; i < n; i++) {
      printf("%d", ans[i][0]);
      for (int j = 1; j < m; j++) printf(" %d", ans[i][j]);
      puts("");
    }
  }
  return 0;
}