p,c = [ int(v) for v in input().split() ] ep = (2+3+5+7+11+13)/6 ec = (4+6+8+9+10+12)/6 print(ep**p*ec**c)