n,m=map(int,input().split()) ANS=[[0]*(2**m) for i in range(2**n)] for i in range(2**n): for j in range(2**m): ANS[i][j]=i^(j*(1<