H,W=map(int,input().split()) if H==2 or W==2: print("Yes") if H==2: print(*range(1,W+1)) print(*reversed(range(W+1,W*2+1))) else: ans=[list(range(1,H+1)),list(range(H+1,H*2+1))[::-1]] for a,b in zip(*ans): print(a,b) exit() if H==W==3: print("""Yes 1 5 3 9 8 7 4 2 6""") exit() print("No")