import java.math.*;import java.util.*;public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}} import java.math.*; math.* java import java.util.*; util.* java public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}} Main public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}} main {for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}} for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));} Scanner s=new Scanner(System.in); Scanner s=new Scanner(System.in); s new Scanner(System.in) s.hasNext() s.hasNext s {BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));} {BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));} BigInteger x=s.nextBigInteger() x s.nextBigInteger() s.nextBigInteger s y=s.nextBigInteger(); y s.nextBigInteger() s.nextBigInteger s System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y))) System.out.println System.out System System.out x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)) x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)) x.gcd(y) x.gcd x y " " x.multiply(y).divide(x.gcd(y)) x.multiply(y).divide x.multiply(y) x.multiply x y x.gcd(y) x.gcd x y String[]a a public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}} public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}} Main
import java.math.*;import java.util.*;public class Main{public static void main(String[]a){for(Scanner s=new Scanner(System.in);s.hasNext();){BigInteger x=s.nextBigInteger(),y=s.nextBigInteger();System.out.println(x.gcd(y)+" "+x.multiply(y).divide(x.gcd(y)));}}}