P,C=map(int,input().split()) p=sum([2,3,5,7,11,13])/6 c=sum([4,6,8,9,10,12])/6 print(pow(p,P)*pow(c,C))