#include #include #include #include #include using namespace std; int main() { int a, b; cin >> a >> b; int x = a | b; long long ans = 1; for (int i = 1; i <= x; ++i) { ans *= i; } cout << ans << endl; return 0; }