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