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;
int matrix[500][500];
int main() {
  deque<int> ans1(4);
  ans1[0] = 2;
  ans1[1] = 4;
  ans1[2] = 1;
  ans1[3] = 3;
  int n, m;
  cin >> n >> m;
  int a = n, b = m;
  ;
  if (a > b) swap(a, b);
  if (a == 1 && b == 1)
    cout << 1;
  else if ((a == 1 && b < 4) || (a == 2 && b < 3))
    cout << -1;
  else {
    if (a == 1) {
      for (int i = 5; i <= b; i++)
        if (i % 2)
          ans1.push_back(i);
        else
          ans1.push_front(i);
      for (int i = 0; i < ans1.size(); i++)
        cout << ans1[i] << (n == 1 ? ' ' : '\n');
    } else {
      matrix[0][0] = 3;
      matrix[0][1] = 6;
      matrix[0][2] = 2;
      matrix[1][0] = 5;
      matrix[1][1] = 1;
      matrix[1][2] = 4;
      int lastint = 7;
      for (int i = 2; i < a; i++)
        for (int j = 0; j < 3; j++) {
          matrix[i][j] = lastint++;
          if (j % 2) swap(matrix[i][j], matrix[i - 1][j]);
        }
      for (int i = 3; i < b; i++)
        for (int j = 0; j < a; j++) {
          matrix[j][i] = lastint++;
          if (j % 2) swap(matrix[j][i], matrix[j][i - 1]);
        }
      if (a == n)
        for (int i = 0; i < a; i++, cout << endl)
          for (int j = 0; j < b; j++) cout << matrix[i][j] << ' ';
      else
        for (int i = 0; i < b; i++, cout << endl)
          for (int j = 0; j < a; j++) cout << matrix[j][i] << ' ';
    }
  }
  return 0;
}