import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
}
/tmp/hf-datasets-cache/medium/datasets/42704881117311-config-parquet-and-info-qiankunmu-Project_CodeNet-896c9d36/hub/datasets--qiankunmu--Project_CodeNet_Python800_and_Java250/snapshots/c899fde44a77ba1cc14973ed3de064e4ff3aadc7/Project_CodeNet_Java250.tar.gz