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