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