def fun(x,y):
    a=x*y
    b=x**y
    print("{}\n{}".format(a,b))
x=int(input())
y=int(input())
fun(x,y)