import java.util.*;

class GL {
	public long GCD,LCM;

	public GL(long a,long b){
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	}
	private long gcd(long a,long b){
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	}
}

public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
}
/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