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