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 oo = 0x3f3f3f3f;
const double eps = 1e-9;
int f[110][110];
int main() {
  int R, C;
  scanf("%d%d", &R, &C);
  bool sw = false;
  if (R > C) {
    sw = true;
    swap(R, C);
  }
  if (C >= 4) {
    for (int i = (0); i < (C); i++) {
      int id = i * 2 + 1;
      if (id >= C) {
        id -= C;
        if ((C & 1) == 0) --id;
      }
      f[0][id] = i + 1;
    }
    for (int r = (1); r < (R); r++)
      for (int c = (0); c < (C); c++) f[r][c] = f[r - 1][c] + C;
  } else if (C == 3) {
    if (R == 1) {
      printf("-1");
      return 0;
    }
    if (R == 2) {
      f[0][0] = 3;
      f[0][1] = 6;
      f[0][2] = 2;
      f[1][0] = 5;
      f[1][1] = 1;
      f[1][2] = 4;
    } else {
      f[0][0] = 1;
      f[0][1] = 6;
      f[0][2] = 2;
      f[1][0] = 7;
      f[1][1] = 3;
      f[1][2] = 8;
      f[2][0] = 4;
      f[2][1] = 9;
      f[2][2] = 5;
    }
  } else if (C == 2) {
    printf("-1");
    return 0;
  } else {
    printf("1");
    return 0;
  }
  if (sw) {
    for (int c = (0); c < (C); c++) {
      printf("%d", f[0][c]);
      for (int r = (1); r < (R); r++) printf(" %d", f[r][c]);
      printf("\n");
    }
  } else {
    for (int r = (0); r < (R); r++) {
      printf("%d", f[r][0]);
      for (int c = (1); c < (C); c++) printf(" %d", f[r][c]);
      printf("\n");
    }
  }
  return 0;
}