p, c = map(int, input().split()) pe = (2 + 3 + 5 + 7 + 11 + 13) / 6 ce = (4 + 6 + 8 + 9 + 10 + 12) / 6 ans = pe**p * ce**c print(ans)