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(3)
#pragma GCC optimize("-funsafe-loop-optimizations")
#pragma GCC optimize("-funroll-loops")
#pragma GCC optimize("-fwhole-program")
#pragma GCC optimize("Ofast,no-stack-protector")
#pragma GCC optimize("-fthread-jumps")
#pragma GCC optimize("-falign-functions")
#pragma GCC optimize("-falign-jumps")
#pragma GCC optimize("-falign-loops")
#pragma GCC optimize("-falign-labels")
#pragma GCC optimize("-fcaller-saves")
#pragma GCC optimize("-fcrossjumping")
#pragma GCC optimize("-fcse-follow-jumps")
#pragma GCC optimize("-fcse-skip-blocks")
#pragma GCC optimize("-fdelete-null-pointer-checks")
#pragma GCC optimize("-fdevirtualize")
#pragma GCC optimize("-fexpensive-optimizations")
#pragma GCC optimize("-fgcse")
#pragma GCC optimize("-fgcse-lm")
#pragma GCC optimize("-finline-small-functions")
#pragma GCC optimize("-findirect-inlining")
#pragma GCC optimize("-fipa-sra")
#pragma GCC optimize("-foptimize-sibling-calls")
#pragma GCC optimize("-fpartial-inlining")
#pragma GCC optimize("-fpeephole2")
#pragma GCC optimize("-freorder-blocks")
#pragma GCC optimize("-freorder-functions")
#pragma GCC optimize("-frerun-cse-after-loop")
#pragma GCC optimize("-fsched-interblock")
#pragma GCC optimize("-fsched-spec")
#pragma GCC optimize("-fschedule-insns")
#pragma GCC optimize("-fschedule-insns2")
#pragma GCC optimize("-fstrict-aliasing")
#pragma GCC optimize("-fstrict-overflow")
#pragma GCC optimize("-ftree-switch-conversion")
#pragma GCC optimize("-ftree-tail-merge")
#pragma GCC optimize("-ftree-pre")
#pragma GCC optimize("-ftree-vrp")
#pragma GCC target("sse,sse2,sse3,sse3,sse4,popcnt,abm,mmx")
#pragma GCC target("avx")
using namespace std;
struct IN {
} in;
inline bool delim(char& c) { return c == ' ' || c == '\n' || c == '\r'; }
template <typename T>
inline IN& operator>>(IN& t, T& a) {
  char buf;
  a = 0;
  while (delim(buf = getchar()))
    ;
  if (buf == '-') {
    t >> a;
    a = -a;
    return t;
  }
  while (true) {
    a *= 10;
    a += buf - '0';
    if (delim(buf = getchar())) break;
  }
  return t;
}
inline IN& operator>>(IN& t, std::string& s) {
  char buf;
  s.clear();
  while (delim(buf = getchar()))
    ;
  do {
    s += buf;
  } while (!delim(buf = getchar()));
  return t;
}
inline IN& operator>>(IN& t, char& c) {
  while (delim(c = getchar()))
    ;
  return t;
}
using namespace std;
const int32_t N = 2 * (1e5) + 5;
const int32_t MOD = (1e9) + 7;
vector<vector<int32_t> > ans;
int32_t main() {
  ios_base::sync_with_stdio();
  cout.tie(0);
  int32_t n, m, now;
  in >> n >> m;
  if (n == 1 && m == 1) {
    cout << "YES" << endl;
    cout << "1" << endl;
    return 0;
  }
  if (n == 3 && m == 3) {
    cout << "YES" << endl;
    cout << "1 3 4" << endl << "5 7 6" << endl << "9 2 8" << endl;
    return 0;
  }
  if (m <= 3 && n <= 3) {
    cout << "NO" << endl;
    return 0;
  }
  ans.resize(n + 1);
  for (int32_t i(0); i <= n; i++) {
    ans[i].resize(m + 1);
  }
  if (m < 4) {
    if (n % 2 == 0) {
      for (int32_t i(0); i < m; i++) {
        now = i + 1;
        for (int32_t j(0); j < n / 2; j++) {
          ans[1 + j * 2][i] = now;
          now += m;
        }
        for (int32_t j(0); j < n / 2; j++) {
          ans[j * 2][i] = now;
          now += m;
        }
        if (i % 2 == 1) {
          for (int32_t j(0); j < n / 2; j++) {
            swap(ans[j][i], ans[n - j - 1][i]);
          }
        }
      }
    }
    if (n % 2 == 1) {
      for (int32_t i(0); i < m; i++) {
        if (i % 2 == 0) {
          now = i + 1;
          for (int32_t j(0); j < (n + 1) / 2; j++) {
            ans[j * 2][i] = now;
            now += m;
          }
          for (int32_t j(0); j < n / 2; j++) {
            ans[j * 2 + 1][i] = now;
            now += m;
          }
        }
        if (i % 2 == 1) {
          now = i + 1;
          for (int32_t j(0); j < n / 2; j++) {
            ans[j * 2 + 1][i] = now;
            now += m;
          }
          for (int32_t j(0); j < (n + 1) / 2; j++) {
            ans[j * 2][i] = now;
            now += m;
          }
        }
      }
    }
  }
  if (m >= 4) {
    if (m % 2 == 0) {
      for (int32_t i(0); i < n; i++) {
        now = i * m + 1;
        for (int32_t j(0); j < m / 2; j++) {
          ans[i][1 + j * 2] = now;
          now++;
        }
        for (int32_t j(0); j < m / 2; j++) {
          ans[i][j * 2] = now;
          now++;
        }
        if (i % 2 == 1) {
          reverse(ans[i].begin(), ans[i].end() - 1);
        }
      }
    } else {
      for (int32_t i(0); i < n; i++) {
        if (i % 2 == 0) {
          now = i * m + 1;
          for (int32_t j(0); j < (m + 1) / 2; j++) {
            ans[i][j * 2] = now;
            now++;
          }
          for (int32_t j(0); j < m / 2; j++) {
            ans[i][j * 2 + 1] = now;
            now++;
          }
        }
        if (i % 2 == 1) {
          now = i * m + 1;
          for (int32_t j(0); j < m / 2; j++) {
            ans[i][j * 2 + 1] = now;
            now++;
          }
          for (int32_t j(0); j < (m + 1) / 2; j++) {
            ans[i][j * 2] = now;
            now++;
          }
        }
      }
    }
  }
  cout << "YES" << endl;
  for (int32_t i(0); i < n; i++) {
    for (int32_t j(0); j < m; j++) {
      cout << ans[i][j] << ' ';
    }
    cout << endl;
  }
}