a,b = map(int,input().split()) p = [2,3,5,7,11,13] g = [4,6,8,9,10,12] x = sum(p)/6 y = sum(g)/6 print(x**a*y**b)