x = int(input())
y = int(input())
m = x * y
n = x ** y
print(m,n,sep='\n')#sep='\n',分行打印