import java.util.*;
public class Main{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	}
	static int s(int a,int b){
		return b==0?a:s(b, a%b);
	}
} import java.util.*; util.* java public class Main{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	}
	static int s(int a,int b){
		return b==0?a:s(b, a%b);
	}
} Main public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	} main { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) int c c d; d while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		} sc.hasNext() sc.hasNext sc {
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		} int a=sc.nextInt(); a sc.nextInt() sc.nextInt sc int b=sc.nextInt(); b sc.nextInt() sc.nextInt sc c=s(a,b) c s(a,b) s a b d=a/c*b d a/c*b a/c a c b System.out.println(c+" "+d) System.out.println System.out System System.out c+" "+d c+" "+d c " " d String[] args args static int s(int a,int b){
		return b==0?a:s(b, a%b);
	} s {
		return b==0?a:s(b, a%b);
	} return b==0?a:s(b, a%b); b==0?a:s(b, a%b) b==0 b 0 a s(b, a%b) s b a%b a b int a a int b b public class Main{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	}
	static int s(int a,int b){
		return b==0?a:s(b, a%b);
	}
} public class Main{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	}
	static int s(int a,int b){
		return b==0?a:s(b, a%b);
	}
} Main
import java.util.*;
public class Main{
	public static void main(String[] args) { 
		Scanner sc = new Scanner(System.in);
		int c,d;
		while(sc.hasNext()){
			int a=sc.nextInt();
			int b=sc.nextInt();
			c=s(a,b);
			d=a/c*b;
			System.out.println(c+" "+d);
		}
	}
	static int s(int a,int b){
		return b==0?a:s(b, a%b);
	}
}