a, n = map(int, input().split()) print(1 << 32) print(pow(a, n, 1 << 32))