#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int s = 0, k = 1;
  char c = getchar();
  while (!isdigit(c)) {
    if (c == '-') k = -1;
    c = getchar();
  }
  while (isdigit(c)) {
    s = s * 10 + c - '0';
    c = getchar();
  }
  return s * k;
}
int n, m, a[100000];
bool xl(int x, int y) {
  if (x == y + m || x == y - m || x == y - 1 || x == y + 1) return true;
  return false;
}
bool flag = false;
void dfs(int k) {
  if (k == n * m) {
    flag = true;
    return;
  }
  for (int i = k; i < n * m; i++) {
    swap(a[k], a[i]);
    int x = k / m, y = k % m;
    if ((x && xl(a[k], a[k - m])) || (y && xl(a[k], a[k - 1]))) {
      continue;
    }
    dfs(k + 1);
    if (flag) return;
    swap(a[k], a[i]);
  }
}
int main() {
  n = read();
  m = read();
  for (int i = 0; i < n * m; i++) {
    a[i] = i;
  }
  dfs(0);
  if (flag) {
    cout << "Yes" << endl;
    for (int i = 0; i < n; i++) {
      for (int j = 0; j < m; j++) {
        cout << a[i * m + j] + 1 << " ";
      }
      cout << endl;
    }
  } else
    cout << "No";
}
