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>
using namespace std;
long long int mod = 1e9 + 7;
double eps = 1e-9;
long long int exp(long long int x, long long int y) {
  if (y < 0) return 0;
  long long int ret = 1;
  for (; y; y >>= 1, x = (x * x) % mod) {
    if (y & 1) ret = (ret * x) % mod;
  }
  return ret;
}
long long int pexp(long long int x, long long int y) {
  if (y < 0) return 0;
  long long int ret = 1;
  for (; y; y >>= 1, x = (x * x)) {
    if (y & 1) ret = (ret * x);
  }
  return ret;
}
long long int gcd(long long int x, long long int y) {
  if (!x || !y) return x + y;
  return x % y == 0 ? y : gcd(y, x % y);
}
long long int lcm(long long int x, long long int y) {
  return x * (y / gcd(x, y));
}
long long int bsum(long long int u, long long int b) {
  long long int ret = 0;
  if (u < b) return u;
  while (u) {
    ret += u % b;
    u /= b;
  }
  return ret;
}
long long int prival(long long int u, long long int p) {
  long long int cn = 0;
  while (u % p == 0) {
    cn++;
    u = u / p;
  }
  return cn;
}
long long int minv(long long int a, long long int b) {
  return 1 < a ? b - minv(b % a, a) * b / a : 1;
}
long long int extm(long long int a, long long int b) {
  long long int ret = 0;
  while (a != 0) {
    if (a % 2 == 1) {
      ret += b;
      ret %= mod;
    }
    a >>= 1;
    b = (2 * b) % mod;
  }
  return ret;
}
long long int eaphi(long long int x) {
  long long int t = x, ret = x, i;
  for (i = 2; i * i <= x; i++) {
    if (t % i == 0) {
      ret -= ret / i;
      while (t % i == 0) t /= i;
    }
  }
  if (t != 1) ret -= ret / t;
  return ret;
}
long long int eadivc(long long int x) {
  long long int ret = 0;
  long long int i;
  for (i = 1; i * i <= x; i++) {
    if (x % i == 0 && i * i != x) ret += 2;
    if (x % i == 0 && i * i == x) ret += 1;
  }
  return ret;
}
long long int ndig(long long int x, long long int b) {
  long long int ret = 0;
  while (x) {
    x /= b;
    ret++;
  }
  return ret;
}
bool isprime(long long int x) {
  if (x <= 1) return false;
  for (long long int i = 2; i * i <= x; i++) {
    if (x % i == 0) {
      return false;
    }
  }
  return true;
}
int n, m;
vector<vector<int> > X;
void create(void) {
  int i, j;
  for (i = 0; i <= n + 2; i++) {
    vector<int> T;
    T.clear();
    for (j = 0; j <= m + 2; j++) {
      T.push_back(0);
    }
    X.push_back(T);
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      X[i][j] = (i - 1) * m + j;
    }
  }
  if (n >= 4) {
    for (j = 1; j <= m; j += 2) {
      X[n + 1][j] = X[1][j];
      X[n + 2][j] = X[2][j];
      for (i = 1; i <= n; i++) {
        X[i][j] = X[i + 2][j];
      }
    }
    for (i = 1; i <= n; i += 2) {
      X[i][0] = X[i][m];
      for (j = m; j >= 1; j--) {
        X[i][j] = X[i][j - 1];
      }
    }
  } else {
    for (i = 1; i <= n; i += 2) {
      X[i][m + 1] = X[i][1];
      X[i][m + 2] = X[i][2];
      for (j = 1; j <= m; j++) {
        X[i][j] = X[i][j + 2];
      }
    }
    for (j = 1; j <= m; j += 2) {
      X[0][j] = X[n][j];
      for (i = n; i >= 1; i--) {
        X[i][j] = X[i - 1][j];
      }
    }
  }
  for (i = 1; i <= n; i++) {
    for (j = 1; j <= m; j++) {
      printf("%d ", X[i][j]);
    }
    printf("\n");
  }
}
int main(void) {
  cin >> n >> m;
  int i, j;
  if (n == 1 && m == 1) {
    printf("YES\n");
    printf("1");
    return 0;
  }
  if (min(n, m) == 1) {
    if (max(n, m) <= 3) {
      printf("NO");
      return 0;
    }
    printf("YES\n");
    for (i = 2; i <= max(n, m); i += 2) {
      printf("%d", i);
      if (n == 1) printf(" ");
      if (m == 1) printf("\n");
    }
    for (i = 1; i <= max(n, m); i += 2) {
      printf("%d", i);
      if (n == 1) printf(" ");
      if (m == 1) printf("\n");
    }
    return 0;
  }
  if (n <= 3 && m <= 3) {
    if (n == 3 && m == 3) {
      printf("YES\n");
      printf("8 1 6\n");
      printf("3 5 7\n");
      printf("4 9 2\n");
      return 0;
    }
    printf("NO");
    return 0;
  }
  printf("YES\n");
  create();
  return 0;
}