import sys input = sys.stdin.readline from fractions import Fraction eps=0.00000000001 A,B=input().split() A=Fraction(A) B=Fraction(B) if B>5: B-=int(B)-1 x=A**B if abs(round(x)-x)