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