import java.util.Scanner;
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	}
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
	public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	}
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
	public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	}
} Main static Scanner sc = new Scanner(System.in); sc new Scanner(System.in) public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	} main {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	} Main values = new Main(); values new Main() long a a b; b while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));} sc.hasNext() sc.hasNext sc {
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));} a = sc.nextLong() a sc.nextLong() sc.nextLong sc b = sc.nextLong() b sc.nextLong() sc.nextLong sc System.out.println(values.GCF(a, b)+" "+values.LCM(a, b)) System.out.println System.out System System.out values.GCF(a, b)+" "+values.LCM(a, b) values.GCF(a, b)+" "+values.LCM(a, b) values.GCF(a, b) values.GCF values a b " " values.LCM(a, b) values.LCM values a b String[] args args public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	} GCF {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	} if (b == 0) return a;
	    else return (GCF (b, a % b)); b == 0 b 0 return a; a return (GCF (b, a % b)); (GCF (b, a % b)) GCF b a % b a b long a a long b b public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	} LCM {
		return (a*b)/GCF(a,b);
	} return (a*b)/GCF(a,b); (a*b)/GCF(a,b) (a*b) a b GCF(a,b) GCF a b long a a long b b public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	}
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
	public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	}
} public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	}
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
	public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	}
} Main
import java.util.Scanner;
public class Main {
	static Scanner sc = new Scanner(System.in);
	public static void main (String[] args) {
		Main values = new Main(); 
		long a,b;
		while (sc.hasNext()){
			a = sc.nextLong();
			b = sc.nextLong();
			System.out.println(values.GCF(a, b)+" "+values.LCM(a, b));}
	}
	public long GCF(long a, long b) {
	    if (b == 0) return a;
	    else return (GCF (b, a % b));
	}
	public long LCM(long a, long b){
		return (a*b)/GCF(a,b);
	}
}