def extgcd(x,y): if y==0: return 1,0 #g=x r0,r1,s0,s1 = x,y,1,0 while r1 != 0: r0,r1, s0,s1 = r1,r0%r1, s1,s0-r0//r1*s1 #g = r0 return s0,(r0-s0*x)//y def modinv(a,MOD): x,y = extgcd(a,MOD) return x%MOD # coding: utf-8 # Your code here! import sys readline = sys.stdin.readline read = sys.stdin.read n,m = [int(i) if i != "-1" else 0 for i in read().split()] MOD = 998244353 p2 = [1]*(m+1) for i in range(m): p2[i+1] = p2[i]*2%MOD # ans1: 2^d # ans2: dim == d なる S の数 # ans3: dim V == d なる V \subset F2_^M の数 d = min(n,m) ans1 = pow(2,d,MOD) ans3 = [0]*(m+1) ans3[0] = vd = fac = 1 for i in range(d): ans3[i+1] = ans3[i]*(p2[m] - p2[i])%MOD vd *= p2[d] - p2[i] vd %= MOD fac *= (i+1) fac %= MOD ans2 = ans3[d]*modinv(fac,MOD)%MOD vdinv = modinv(vd,MOD) ans3[d] *= vdinv ans3[d] %= MOD print(ans1,ans2,ans3[d])