#include <bits/stdc++.h>

using namespace std;

int N, R;

int main() {
//	freopen("date.in", "r", stdin);
//	freopen("date.out","w", stdout);
	cin.sync_with_stdio(false);
	
	cin >> N >> R;
	
	cout << "(";
	for (int i = N / 4 + 1; i <= N; i++) {
		if (i > N / 4 + 1) {
			cout << "*";
		}
		cout << i;
	}
	cout << "/(24^" << N / 4 << "))^" << R << endl;
	
	return 0;
}