h, w = map(int, input().split()) A = [[0] * w for _ in range(h)] for i in range(h): for j in range(w): if j & 1: ii = h - 1 - i else: ii = i if i & 1: jj = w - 1 - j else: jj = j x = ii * w + jj + 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