#include using namespace std; // clang-format off namespace viewer {templatestring f(T i){string s=(i==1001001001||i==1001001001001001001?"inf":to_string(i));s=string(max(0,3-(int)s.size()),' ')+s;return s;} void view(const char c,string end="\n"){cerr<void view(const T&x,string end="\n"){cerr<void view(const pair&p,string end="\n"){cerr<<"("<(p))<<", "<(p))<<")"<void view(const tuple&p,string end="\n"){cerr<<"("<(p))<<", "<(p))<<")"<void view(const tuple&t,string end="\n"){cerr<<"("<(t))<<", "<(t));cerr<<", "<(t))<<")"<void view(const tuple&t,string end="\n"){cerr<<"("<(t))<<", "<(t))<<", "<(t))<<", "<(t))<<")"<void view(const vector&vx,string _end=""){bool is_value=is_integral();cerr<<"{"<<(vx.empty()||is_value?"":"\n");for(const T&x:vx){if(!is_value)cerr<<" ";view(x,(is_value?",":"\n"));};cerr<<"}\n"<<_end;} templatevoid view(const set&s){vectorv(s.begin(),s.end());view(v);} templatevoid view(const multiset&s){vectorv(s.begin(),s.end());view(v);} templatevoid view(const unordered_set&s){vectorv(s.begin(),s.end());view(v);} templatevoid view(const deque&s){vectorv(s.begin(),s.end());view(v);} templatevoid view(const priority_queue&p){priority_queueq=p;vectorv;while(!q.empty()){v.push_back(q.top());q.pop();}view(v);} templatevoid view(const map&m){cerr<<"{"<<(m.empty()?"":"\n");for(const auto&kv:m){cerr<<" [";view(kv.first,"");cerr<<"] : ";view(kv.second,"");cerr<<"\n";}cerr<<"}\n";} templatevoid _view(const T&var,string var_name,int line_num){cerr<&vb:vvb){for(const bool&b:vb)cerr<<(b?".":"#");cerr<<"\n";}}} //グリッド用 "."と"#"は交換可 // clang-format on #define chmax(a, b) a = (((a) < (b)) ? (b) : (a)) #define chmin(a, b) a = (((a) > (b)) ? (b) : (a)) #define debug(var) viewer::_view(var, #var, __LINE__) constexpr int INF = 1001001001; int main() { cin.tie(0); ios::sync_with_stdio(false); int N; cin >> N; int M; cin >> M; long long ans = 1; for (int i = 1; i <= (N | M); i++) { ans *= (long long)i; } cout << ans << endl; return 0; }