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;
struct iii {
  int a, b, c;
  iii() {}
  iii(int a, int b, int c) : a(a), b(b), c(c) {}
  bool operator<(const iii& e) const {
    return a < e.a || a == e.a && (b < e.b || b == e.b && c < e.c);
  }
};
template <typename T>
T sq(const T& x) {
  return x * x;
}
template <typename T>
void minl(T& a, const T& b) {
  if (a > b) a = b;
}
template <typename T>
void maxl(T& a, const T& b) {
  if (a < b) a = b;
}
template <typename T>
void operator+=(vector<T>& a, const T& x) {
  a.push_back(x);
}
template <typename T>
void operator+=(set<T>& a, const T& x) {
  a.insert(x);
}
template <typename T>
bool operator&(const set<T>& a, const T& x) {
  return a.find(x) != a.end();
}
template <typename A, typename B>
istream& operator>>(istream& i, pair<A, B>& v) {
  return i >> v.first >> v.second;
}
pair<int, int> operator+(const pair<int, int>& a, const pair<int, int>& b) {
  return pair<int, int>(a.first + b.first, a.second + b.second);
}
pair<int, int> operator-(const pair<int, int>& a, const pair<int, int>& b) {
  return pair<int, int>(a.first - b.first, a.second - b.second);
}
template <typename T>
void usort(vector<T>& a) {
  sort((a).begin(), (a).end());
  a.erase(unique((a).begin(), (a).end()), a.end());
}
template <typename T>
int index(const vector<T>& a, const T& x) {
  return lower_bound((a).begin(), (a).end(), x) - a.begin();
}
template <typename T>
T gcd(T a, T b) {
  while (b) {
    T t = a % b;
    a = b;
    b = t;
  }
  return a;
}
long long cross(const pair<int, int>& a, const pair<int, int>& b) {
  return (long long)a.first * b.second - (long long)b.first * a.second;
}
long long dot(const pair<int, int>& a, const pair<int, int>& b) {
  return (long long)a.first * b.first + (long long)a.second * b.second;
}
int bitcnt(unsigned x) { return __builtin_popcount(x); }
int bitlow(unsigned x) { return __builtin_ffs(x); }
int n, m;
int mat[100][100];
bool jiong(int i, int j) {
  if (i > 0 && abs(mat[i][j] - mat[i - 1][j]) <= 1) return true;
  if (j > 0 && abs(mat[i][j] - mat[i][j - 1]) <= 1) return true;
  if (i + 1 < n && abs(mat[i][j] - mat[i + 1][j]) <= 1) return true;
  if (j + 1 < m && abs(mat[i][j] - mat[i][j + 1]) <= 1) return true;
  return false;
}
void york() {
  cin >> n >> m;
  if (n == 1) {
    if (m == 2 || m == 3) {
      cout << -1;
      return;
    }
    if (m == 4) {
      cout << "3 1 4 2";
      return;
    }
    int a = 1;
    int b = (m + 1) / 2 + 1;
    for (int i = 0; i < (m); ++i) {
      if (i) cout << ' ';
      if (i & 1)
        cout << b++;
      else
        cout << a++;
    }
    return;
  }
  if (n == 4 && m == 1) {
    cout << "3\n1\n4\n2";
    return;
  }
  int a = 1;
  int b = (m * n) / 2 + 1;
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (m); ++j) {
      if (i + j & 1) {
        mat[i][j] = a++;
      } else {
        mat[i][j] = b++;
      }
    }
  }
  for (int i = 0; i < (n); ++i) {
    for (int j = 0; j < (m); ++j) {
      if (jiong(i, j)) {
        cout << -1;
        return;
      }
    }
  }
  for (int i = 0; i < (n); ++i) {
    if (i) cout << endl;
    for (int j = 0; j < (m); ++j) {
      if (j) cout << ' ';
      cout << mat[i][j];
    }
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  york();
  return 0;
}