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;
bool used[10000005];
int ans[105];
bool comp(pair<pair<int, int>, int> a, pair<pair<int, int>, int> b) {
  if (a.first.second == b.first.second) return a.first.first < b.first.first;
  return a.first.second < b.first.second;
}
void solve() {
  int a, b;
  cin >> a >> b;
  int x[a][b];
  int cur = 1;
  if (a > 3) {
    for (int i = 0; i < b; i++) {
      for (int j = a / 2; j < a; j++) {
        x[j][i] = cur;
        cur++;
        if (a % 2 == 0 || j != a - 1) {
          x[j - a / 2][i] = cur;
          cur++;
        }
      }
    }
  } else if (b > 3) {
    for (int i = 0; i < a; i++) {
      for (int j = b / 2; j < b; j++) {
        x[i][j] = cur;
        cur++;
        if (b % 2 == 0 || j != b - 1) {
          x[i][j - b / 2] = cur;
          cur++;
        }
      }
    }
  } else {
    if (a == 1 && b == 1) {
      cout << 1;
      return;
    }
    if (a <= 2 && b <= 2) {
      cout << -1;
      return;
    } else if (b == 1 || a == 1) {
      cout << -1;
      return;
    } else if (a == 2) {
      cout << "3 6 2\n5 1 4";
      return;
    } else if (b == 2) {
      cout << "3 5\n6 1\n2 4";
      return;
    } else {
      cout << "2 8 3" << '\n';
      cout << "4 1 5" << '\n';
      cout << "6 9 7" << '\n';
      return;
    }
  }
  for (int i = 0; i < a; i++) {
    for (int j = 0; j < b; j++) {
      cout << x[i][j] << " ";
    }
    cout << '\n';
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int t = 1;
  while (t--) {
    solve();
  }
  return 0;
}