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 comment(linker, "/stack:200000000")
#pragma GCC optimize("Ofast")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
int ni() {
  int val;
  scanf("%i", &val);
  return val;
}
pair<int, int> npi() {
  pair<int, int> val;
  scanf("%i %i", &val.first, &val.second);
  return val;
}
int64_t nll() {
  int64_t val;
  scanf("%I64d", &val);
  return val;
}
vector<int> nvi(int n, int corr = 0) {
  vector<int> a(n);
  for (int i = 0; i < n; ++i) a[i] = ni() + corr;
  return move(a);
}
char nc() {
  char val;
  do {
    val = getchar();
  } while (val == ' ' || val == '\r' || val == '\n');
  return val;
}
char ncs() {
  char val;
  do {
    val = getchar();
  } while (false);
  return val;
}
string ns() {
  static char buff[1024 * 4000];
  scanf("%s", buff);
  return string{buff};
}
int64_t gcd(int64_t a, int64_t b) {
  while (b) {
    auto tmp = a % b;
    a = b;
    b = tmp;
  }
  return a;
}
int64_t tr2(int xv1, int yv1, int xv2, int yv2, int x3, int y3) {
  return 1LL * (xv2 - xv1) * (y3 - yv1) - 1LL * (yv2 - yv1) * (x3 - xv1);
}
const long double eps = 1e-12;
const long double pi = acos(-1.0);
bool eq(long double a, long double b) { return abs(a - b) <= eps; }
int8_t bits_cnt[256];
const string input_dir = "inputs\\";
string input_file = input_dir + "input.txt";
string output_file = input_dir + "output.txt";
void init_streams() {}
void init_data() {
  for (int i = 1; i <= 255; ++i)
    for (int j = 0; j < 8; ++j)
      if ((1 << j) & i) ++bits_cnt[i];
}
int bit_count(int v) {
  return bits_cnt[v & 0xFF] + bits_cnt[(v >> 8) & 0xFF] +
         bits_cnt[(v >> 16) & 0xFF] + bits_cnt[(v >> 24) & 0xFF];
}
void ret_no() {
  cout << "NO\n";
  exit(0);
}
void check_no(int n, int m) {
  if ((n == 1 && m == 2) || (n == 1 && m == 3) || (n == 2 && m == 1) ||
      (n == 3 && m == 1) || (n == 2 && m == 2) || (n == 3 && m == 2) ||
      (n == 2 && m == 3))
    ret_no();
  if (n == 1 && m == 1) {
    cout << "YES\n";
    cout << "1\n";
    exit(0);
  }
  if (n == 3 && m == 3) {
    cout << "YES\n6 1 8\n7 5 3\n2 9 4\n";
    exit(0);
  }
}
void shuffle(vector<int>& a, int offset) {
  for (int i = offset; i + 1 < a.size(); i += 2) swap(a[i], a[i + 1]);
}
int main() {
  init_streams();
  init_data();
  auto n = ni(), m = ni();
  check_no(n, m);
  if (n == 1) {
    vector<int> v(m);
    for (int i = 0; i < m; ++i) v[i] = i + 1;
    shuffle(v, 0);
    shuffle(v, 1);
    cout << "YES\n";
    for (auto q : v) cout << q << " ";
  } else if (m == 1) {
    vector<int> v(n);
    for (int i = 0; i < n; ++i) v[i] = i + 1;
    shuffle(v, 0);
    shuffle(v, 1);
    cout << "YES\n";
    for (auto q : v) cout << q << "\n";
  } else {
    vector<vector<int>> vs(n, vector<int>(m));
    for (int i = 1; i <= n; ++i)
      for (int j = 1; j <= m; ++j) {
        vs[i - 1][j - 1] = (i - 1) * m + j;
      }
    int r = (m <= 3) ? 1 : 2;
    for (int i = 0; i < n; i += 2) {
      for (int j = 0; j < r; ++j) {
        vs[i].push_back(vs[i].front());
        vs[i].erase(vs[i].begin());
      }
    }
    int q = (m <= 3) ? 2 : 1;
    while (q--) {
      for (int i = 0; i < m; i += 2) {
        auto top = vs[0][i];
        for (int j = 1; j < n; ++j) vs[j - 1][i] = vs[j][i];
        vs[n - 1][i] = top;
      }
    }
    cout << "YES\n";
    for (int i = 0; i < n; ++i) {
      for (int j = 0; j < m; ++j) cout << vs[i][j] << " ";
      cout << "\n";
    }
  }
  return 0;
}