H,W = map(int,input().split()) A = [[0] * W for _ in range(H)] HW = H * W D = (HW % 2) ^ 1 R = [] for i in range(HW): w = i % W h = i // W if (h - w) % 2 == 0: A[h][w] = i + 1 else: R.append(i+1) R.sort(reverse = True) i = 0 for h in range(H): for w in range(W): if A[h][w] == 0: A[h][w] = R[i] i += 1 print("Yes") for i in range(H): print(*A[i])