Problem: Students went into a class to write a test and sat in some way. The teacher thought: "Probably they sat in this order to copy works of each other. I need to rearrange them in such a way that students that were neighbors are not neighbors in a new seating."

The class can be represented as a matrix with n rows and m columns with a student in each cell. Two students are neighbors if cells in which they sit have a common side.

Let's enumerate students from 1 to n·m in order of rows. So a student who initially sits in the cell in row i and column j has a number (i - 1)·m + j. You have to find a matrix with n rows and m columns in which all numbers from 1 to n·m appear exactly once and adjacent numbers in the original matrix are not adjacent in it, or determine that there is no such matrix.

Input

The only line contains two integers n and m (1 ≤ n, m ≤ 105; n·m ≤ 105) — the number of rows and the number of columns in the required matrix.

Output

If there is no such matrix, output "NO" (without quotes). 

Otherwise in the first line output "YES" (without quotes), and in the next n lines output m integers which form the required matrix.

Examples

Input

2 4


Output

YES
5 4 7 2 
3 6 1 8 


Input

2 1


Output

NO

Note

In the first test case the matrix initially looks like this:
    
    
      
    1 2 3 4  
    5 6 7 8  
    

It's easy to see that there are no two students that are adjacent in both matrices.

In the second test case there are only two possible seatings and in both of them students with numbers 1 and 2 are neighbors.

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
#pragma GCC optimize("O3")
using namespace std;
inline long long getint() {
  long long _x = 0, _tmp = 1;
  char _tc = getchar();
  while ((_tc < '0' || _tc > '9') && _tc != '-') _tc = getchar();
  if (_tc == '-') _tc = getchar(), _tmp = -1;
  while (_tc >= '0' && _tc <= '9') _x *= 10, _x += (_tc - '0'), _tc = getchar();
  return _x * _tmp;
}
inline long long add(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x += _y;
  return _x >= _mod ? _x - _mod : _x;
}
inline long long sub(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x -= _y;
  return _x < 0 ? _x + _mod : _x;
}
inline long long mul(long long _x, long long _y,
                     long long _mod = 1000000007LL) {
  _x *= _y;
  return _x >= _mod ? _x % _mod : _x;
}
long long mypow(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 1LL;
  long long _ret = mypow(mul(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = mul(_ret, _a, _mod);
  return _ret;
}
long long mymul(long long _a, long long _x, long long _mod) {
  if (_x == 0) return 0LL;
  long long _ret = mymul(add(_a, _a, _mod), _x >> 1, _mod);
  if (_x & 1) _ret = add(_ret, _a, _mod);
  return _ret;
}
inline bool equal(double _x, double _y) {
  return _x > _y - 1e-9 && _x < _y + 1e-9;
}
void sleep(double sec = 1021) {
  clock_t s = clock();
  while (clock() - s < CLOCKS_PER_SEC * sec)
    ;
}
int __ = 1, _cs;
void build() {}
int n, m;
vector<vector<int> > ans;
void init() {
  n = getint();
  m = getint();
}
int dn[] = {0, 0, 1, -1};
int dm[] = {1, -1, 0, 0};
bool check() {
  for (int i = 0; i < n; i++)
    for (int j = 0; j < m; j++) {
      int now = ans[i][j];
      set<int> gg;
      if (now % m != 1) gg.insert(now - 1);
      if (now % m != 0) gg.insert(now + 1);
      gg.insert(now - m);
      gg.insert(now + m);
      for (int k = 0; k < 4; k++) {
        int nxti = i + dn[k];
        int nxtj = j + dm[k];
        if (0 <= nxti and nxti < n and 0 <= nxtj and nxtj < m and
            gg.find(ans[nxti][nxtj]) != gg.end()) {
          if (n * m > 16) {
            for (int ii = 0; ii < n; ii++)
              for (int jj = 0; jj < m; jj++)
                printf("%d%c", ans[ii][jj], " \n"[jj + 1 == m]);
            cerr << ans[i][j] << " " << ans[nxti][nxtj] << endl;
          }
          return false;
        }
      }
    }
  return true;
}
void go() {
  ans.resize(n);
  for (int i = 0; i < n; i++) ans[i].resize(m);
  for (int i = 0; i < n; i++) {
    int l = i * m + 1;
    int r = i * m + 2;
    int lst = i % m;
    int rst = (lst + ((m + 1) / 2)) % m;
    for (int j = 0; j < m; j++) {
      if (j & 1) {
        ans[i][rst] = r;
        r += 2;
        rst++;
        if (rst >= m) rst = 0;
      } else {
        ans[i][lst] = l;
        l += 2;
        lst++;
        if (lst >= m) lst = 0;
      }
    }
  }
}
void fuck() {
  vector<int> ind;
  for (int i = 1; i <= n * m; i++) ind.push_back(i);
  ans.resize(n);
  for (int i = 0; i < n; i++) ans[i].resize(m);
  do {
    int ptr = 0;
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) ans[i][j] = ind[ptr++];
    if (check()) {
      puts("YES");
      for (int i = 0; i < n; i++)
        for (int j = 0; j < m; j++)
          printf("%d%c", ans[i][j], " \n"[j + 1 == m]);
      exit(0);
    }
  } while (next_permutation(ind.begin(), ind.end()));
  puts("NO");
  exit(0);
}
void solve() {
  if (n == 4 and m == 4) {
    ans.resize(4);
    ans[0] = {5, 4, 7, 2};
    ans[1] = {3, 6, 1, 8};
    ans[2] = {11, 14, 9, 16};
    ans[3] = {13, 12, 15, 10};
    assert(check());
    puts("YES");
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) printf("%d%c", ans[i][j], " \n"[j + 1 == m]);
    exit(0);
  }
  if (max(n, m) <= 4) fuck();
  bool swp = false;
  if (m <= 4) {
    swp = true;
    swap(n, m);
  }
  go();
  assert(check());
  puts("YES");
  if (swp) {
    vector<vector<int> > ori;
    ori.resize(m);
    for (int i = 0; i < m; i++) ori[i].resize(n);
    int qq = 0;
    for (int i = 0; i < m; i++)
      for (int j = 0; j < n; j++) ori[i][j] = ++qq;
    for (int i = 0; i < m; i++)
      for (int j = 0; j < n; j++) {
        int row = (ans[j][i] - 1) % m;
        int col = (ans[j][i] - 1) / m;
        int ggg = ori[row][col];
        printf("%d%c", ggg, " \n"[j + 1 == n]);
      }
  } else {
    for (int i = 0; i < n; i++)
      for (int j = 0; j < m; j++) printf("%d%c", ans[i][j], " \n"[j + 1 == m]);
  }
  exit(0);
}
int main() {
  build();
  while (__--) {
    init();
    solve();
  }
}