import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	}
} import java.util.Scanner; Scanner java.util public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	}
} Main public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	} main {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	} Scanner s = new Scanner(System.in); s new Scanner(System.in) int max max min; min int a a b; b int counter = 0; counter 0 while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		} s.hasNext() s.hasNext s {
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		} a = s.nextInt() a s.nextInt() s.nextInt s b = s.nextInt() b s.nextInt() s.nextInt s int x = a; x a int y = b; y b while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			} x!=y x y {
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			} if(x>y){
					y += b;
				}else{
					x += a;
				} x>y x y {
					y += b;
				} y += b y b {
					x += a;
				} x += a x a min = x min x max = (int)((long)a * b / min) max (int)((long)a * b / min) (long)a * b (long)a b min System.out.println(max+" "+min) System.out.println System.out System System.out max+" "+min max+" "+min max " " min String[] args args public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	}
} public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	}
} Main
import java.util.Scanner;

public class Main {

	public static void main(String[] args) {
		// TODO ?????????????????????????????????????????????
		Scanner s = new Scanner(System.in);
		int max,min;
		int a,b;
		
	int counter = 0;
		while(s.hasNext()){
			
			a = s.nextInt();
			b = s.nextInt();
			int x = a;
			int y = b;
			while(x!=y){
				if(x>y){
					y += b;
				}else{
					x += a;
				}
			}
			min = x;
			max = (int)((long)a * b / min);
			System.out.println(max+" "+min);

		}
	}
}