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