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>
inline int read() {
  int num = 0, f = 1;
  char c = getchar();
  while (c < 48 || c > 57) {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c > 47 && c < 58)
    num = (num << 3) + (num << 1) + (c ^ 48), c = getchar();
  return num * f;
}
inline int read1d() {
  int num = 0;
  char c = getchar();
  while (c < 48 || c > 57) {
    c = getchar();
  }
  return c & 1;
}
namespace subtask1 {
void solve(int n, int m) {
  puts("YES");
  int cnt = 0;
  int **b = new int *[n];
  for (int i = 0; i < n; i++) b[i] = new int[m];
  int u = n & 2147483646;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cnt++;
      if ((i + j + 1) & 1)
        b[i][j] = cnt;
      else {
        int q = i + 4;
        if (q >= n) {
          if (n & 1)
            if (q & 1)
              q = q - n + 1;
            else
              q = q - n - 1;
          else
            q = q - n;
        }
        b[q][j] = cnt;
      }
    }
  }
  for (int i = 0; i < n; i++, puts(""))
    for (int j = 0; j < m; j++) printf("%d ", b[i][j]);
  delete[] b;
}
}  // namespace subtask1
namespace subtask2 {
void solve(int n, int m) {
  puts("YES");
  int cnt = 0;
  int **b = new int *[n];
  for (int i = 0; i < n; i++) b[i] = new int[m];
  int u = m & 2147483646;
  for (int i = 0; i < n; i++) {
    for (int j = 0; j < m; j++) {
      cnt++;
      if ((i + j + 1) & 1)
        b[i][j] = cnt;
      else {
        int q = j + 4;
        if (q >= m) {
          if (m & 1)
            if (q & 1)
              q = q - m + 1;
            else
              q = q - m - 1;
          else
            q = q - m;
        }
        b[i][q] = cnt;
      }
    }
  }
  for (int i = 0; i < n; i++, puts(""))
    for (int j = 0; j < m; j++) printf("%d ", b[i][j]);
  delete[] b;
}
}  // namespace subtask2
namespace subtask3 {
void fill(int *a, int n, int d) {
  int cnt = 1;
  for (int i = (n + 1) >> 1; i > 0; i--) a[i - 1] = d + cnt, cnt += 2;
  cnt = n;
  for (int i = 2; i <= n; i += 2) a[--cnt] = d + i;
}
void filll(int *a, int m, int d, int n) {
  int cnt = 0;
  for (int i = (n + 1) >> 1; i > 0; i--) a[i - 1] = d + cnt, cnt += m + m;
  cnt = n;
  for (int i = 2; i <= n; i += 2) a[--cnt] = d + (i - 1) * m;
  for (int i = 0; i < n; i++) printf("%d ", a[i]);
  puts("");
}
void solve(int n, int m) {
  if (n == 1 && m == 1)
    puts("YES\n1");
  else if (n == 1 && m == 2)
    puts("NO");
  else if (n == 2 && m == 1)
    puts("NO");
  else if (n == 2 && m == 2)
    puts("NO");
  else if (n == 2 && m == 3)
    puts("NO");
  else if (n == 3 && m == 2)
    puts("NO");
  else if (n + m == 4)
    puts("NO");
  else if (n == 3 && m == 3)
    puts("YES\n5 1 6\n3 9 4\n7 2 8");
  else {
    puts("YES");
    if (n == 1 && m == 4)
      puts("3 1 4 2");
    else if (n == 2 && m == 4)
      puts("1 3 5 7\n6 8 2 4");
    else if (n == 3 && m == 4)
      puts("3 1 7 2\n8 6 4 5\n11 9 12 10");
    else if (n == 1 && m == 5)
      puts("1 3 5 2 4");
    else if (n == 2 && m == 5)
      puts("5 3 1 4 6\n9 7 10 2 8");
    else if (n == 3 && m == 5)
      puts("9 3 1 4 6\n13 5 11 14 8\n15 7 10 2 12");
    else if (n == 6 && m == 1)
      puts("1\n3\n5\n2\n4\n6\n");
    else if (n == 6 && m == 2)
      puts("1 4\n5 8\n9 12\n2 3\n6 7\n10 11\n");
    else if (n == 6 && m == 3)
      puts("1 3 5\n7 9 11\n13 15 17\n2 4 6\n8 10 12\n14 16 18");
    else if (n == 7 && m == 1)
      puts("7 5 3 1 6 4 2");
    else if (n == 7 && m == 2)
      puts("1 5 9 13 4 8 12\n3 7 11 2 6 10 14");
    else if (n == 7 && m == 3)
      puts("19 11 3 1 6 4 12\n15 13 5 9 14 8 16\n21 17 7 20 2 10 18");
    else if (n == 4 && m == 1)
      puts("3\n1\n4\n2");
    else if (n == 4 && m == 2)
      puts("1 6\n4 7\n5 2\n8 3");
    else if (n == 4 && m == 3)
      puts("1 3 5\n7 9 11\n6 4 2\n8 10 12");
    else if (n == 5 && m == 1)
      puts("1\n3\n5\n2\n4");
    else if (n == 5 && m == 2)
      puts("1 6\n4 7\n5 10\n8 3\n9 2");
    else if (n == 5 && m == 3)
      puts("1 3 5\n7 9 11\n13 15 2\n4 6 8\n10 12 14");
    else if (n == 1 && m == 6)
      puts("1 3 5 2 4 6");
    else if (n == 2 && m == 6)
      puts("1 3 5 2 4 6\n11 9 7 12 10 8");
    else if (n == 3 && m == 6)
      puts("1 3 5 2 4 6\n11 9 7 12 10 8\n13 15 17 14 16 18");
    else if (n == 7 && m == 1)
      puts("1\n3\n5\n7\n2\n4\n6");
    else if (n == 7 && m == 2)
      puts("1 14\n4 7\n5 10\n8 11\n9 6\n12 3\n13 2");
    else if (n == 7 && m == 3)
      puts("1 3 5\n7 9 11\n13 15 17\n19 21 2\n4 6 8\n10 12 14\n16 18 20");
    else {
      int **b = new int *[n];
      int cnt = 0;
      if (n < m) goto charm1;
      for (int i = 0; i < n; i++) b[i] = new int[m];
      for (int i = n / 2 + 1; i <= n; i++) fill(b[i - 1], m, cnt * m), cnt += 2;
      cnt = 1;
      for (int i = 1; i <= n / 2; i++) fill(b[i - 1], m, cnt * m), cnt += 2;
      for (int i = 0; i < n; i++, puts(""))
        for (int j = 0; j < m; j++) printf("%d ", b[i][j]);
      delete[] b;
      return;
    charm1:;
      delete[] b;
      if (m > 5) {
        b = new int *[m];
        for (int i = 0; i < m; i++) b[i] = new int[n];
        int cnt = 2;
        for (int i = m / 2 + 1; i <= m; i++)
          filll(b[i - 1], m, cnt, n), cnt += 2;
        cnt = 1;
        for (int i = 1; i <= m / 2; i++) filll(b[i - 1], m, cnt, n), cnt += 2;
        for (int j = 0; j < n; j++, puts(""))
          for (int i = 0; i < m; i++) printf("%d ", b[i][j]);
        delete[] b;
      }
    }
  }
}
}  // namespace subtask3
int main() {
  int n = read(), m = read();
  if (n > 7)
    subtask1::solve(n, m);
  else if (m > 7)
    subtask2::solve(n, m);
  else
    subtask3::solve(n, m);
  return 0;
}