#include using namespace std; #define INF 2000000000 #define MOD 1000000007 typedef long long ll; typedef pair P; int main() { int p; int c; cin >> p >> c; double pp[6] = {2,3,5,7,11,13}; double cc[6] = {4,6,8,9,10,12}; double psum = accumulate(pp, pp+6, 0); double csum = accumulate(cc, cc+6, 0); double ret = pow(psum/6,p) * pow(csum/6,c); printf("%.12f\n",ret); }