h,w = map(int,input().split()) ans =[[0 for i in range(w)] for j in range(h)] c1 = 0 c2 = 0 for i in range(h): for j in range(w): if (i+j)%2 == 0: c1 += 1 ans[i][j] = c1 else: c2 += 1 ans[i][j] = h*w+1-c2 print("Yes") for a in ans: print(*a)