import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	}
} import java.util.*; util.* java public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	}
} Main public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	} main {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) ArrayDeque<Integer> ansA = new ArrayDeque<Integer>(); ansA new ArrayDeque<Integer>() ArrayDeque<Integer> ansB = new ArrayDeque<Integer>(); ansB new ArrayDeque<Integer>() while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		} sc.hasNext() sc.hasNext sc {
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		} int m = sc.nextInt(); m sc.nextInt() sc.nextInt sc int n = sc.nextInt(); n sc.nextInt() sc.nextInt sc if(n>m){
				int l = m;
				m=n;
				n=l;
			} n>m n m {
				int l = m;
				m=n;
				n=l;
			} int l = m; l m m=n m n n=l n l int a = m; a m int b = n; b n while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			} n!=0 n 0 {
				int l = n;
				n = m%n;
				m = l;
			} int l = n; l n n = m%n n m%n m n m = l m l ansA.push(m) ansA.push ansA m ansB.push((a/m)*b) ansB.push ansB (a/m)*b (a/m) a m b int num = ansA.size(); num ansA.size() ansA.size ansA for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		} int i=0; int i=0; i 0 i<num i num i++ i++ i {
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		} {
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		} System.out.println(ansA.pollLast() + " " + ansB.pollLast()) System.out.println System.out System System.out ansA.pollLast() + " " + ansB.pollLast() ansA.pollLast() + " " + ansB.pollLast() ansA.pollLast() ansA.pollLast ansA " " ansB.pollLast() ansB.pollLast ansB String[] args args public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	}
} public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	}
} Main
import java.util.*;

public class Main {

	public static void main(String[] args) {
		Scanner sc = new Scanner(System.in);
		ArrayDeque<Integer> ansA = new ArrayDeque<Integer>();
		ArrayDeque<Integer> ansB = new ArrayDeque<Integer>();

		while(sc.hasNext()){
			int m = sc.nextInt();
			int n = sc.nextInt();
			if(n>m){
				int l = m;
				m=n;
				n=l;
			}
			int a = m;
			int b = n;			
			while(n!=0){
				int l = n;
				n = m%n;
				m = l;
			}
			ansA.push(m);
			ansB.push((a/m)*b);
		}
		int num = ansA.size();
		for(int i=0;i<num;i++){
			System.out.println(ansA.pollLast() + " " + ansB.pollLast());
		}
	}
}