package com.example; import java.util.Scanner; /** * Hello world! * */ public class App { public static void main(String[] args) { Scanner sc = new Scanner(System.in); int a = Integer.parseInt(sc.next()); int b = Integer.parseInt(sc.next()); int c = a | b; long d = 1; for (int i = 1; i <= c; i ++) { d *= i; }; System.out.println(d); sc.close(); } }