import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int a=0,b=0,m=0,n=0,t=0;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		}
	}
} import java.util.Scanner; Scanner java.util class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int a=0,b=0,m=0,n=0,t=0;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		}
	}
} Main public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int a=0,b=0,m=0,n=0,t=0;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		}
	} main {
		Scanner scan = new Scanner(System.in);
		int a=0,b=0,m=0,n=0,t=0;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) int a=0 a 0 b=0 b 0 m=0 m 0 n=0 n 0 t=0; t 0 while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		} scan.hasNext() scan.hasNext scan {
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		} a = scan.nextInt() a scan.nextInt() scan.nextInt scan b = scan.nextInt() b scan.nextInt() scan.nextInt scan if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			} a < b a b {
				m = b;
				n = a;
			} m = b m b n = a n a {
				m = a;
				n = b;
			} m = a m a n = b n b while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			} true {
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			} if((t=m % n) == 0){
					break;
				} (t=m % n) == 0 (t=m % n) t m % n m n 0 {
					break;
				} break; m = n m n n = t n t System.out.println(n + " " + a/n*b) System.out.println System.out System System.out n + " " + a/n*b n + " " + a/n*b n " " a/n*b a/n a n b String[] args args
import java.util.Scanner;
class Main{
	public static void main(String[] args){
		Scanner scan = new Scanner(System.in);
		int a=0,b=0,m=0,n=0,t=0;
		while(scan.hasNext()){
			a = scan.nextInt();
			b = scan.nextInt();
			if(a < b){
				m = b;
				n = a;
			}else{
				m = a;
				n = b;
			}
			while(true){
				if((t=m % n) == 0){
					break;
				}
				m = n;
				n = t;
			}
			System.out.println(n + " " + a/n*b);
		}
	}
}