publicclassMain{ publicstaticintGCD(int a, int b){ if(a % b == 0) { return b; } else { return GCD(b, a % b); } } publicstaticvoidmain(String args[])throws IOException{ BufferedReader bf = new BufferedReader(new InputStreamReader(System.in)); String[] line = bf.readLine().split(" "); int A = Integer.parseInt(line[0]); int B = Integer.parseInt(line[1]); int gcd = A > B ? GCD(A, B) : GCD(B, A); int lcm = A * B / gcd; System.out.println(gcd); System.out.println(lcm); } }