a,n=map(int,input().split()) M=998244353 print(M) print(pow(a,n,M))