h, w = map(int, input().split()) A = [[0] * w for _ in range(h)] for i in range(h): for j in range(w): x = i * w + j + 1 A[i][j] = x x += 1 B = [[0] * w for _ in range(h)] for i in range(h): for j in range(w): if i & 1: jj = w - 1 - j else: jj = j x = i * w + jj + 1 B[i][j] = x x += 1 A = [[0] * w for _ in range(h)] for i in range(h): for j in range(w): if j & 1: ii = w - 1 - i else: ii = i x = ii * w + j + 1 A[i][j] = x x += 1 print("Yes") for row in A: print(*row) se = set() for i in range(h - 1): for j in range(w - 1): se.add(A[i][j] + A[i + 1][j] + A[i][j + 1] + A[i + 1][j + 1]) assert len(se) == 1