import java.util.*;
import java.lang.*;
import java.io.*;

public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.io.*; io.* java public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	}
} Main public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	} main {
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	} BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String line = br.readLine(); line br.readLine() br.readLine br while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    } line!=null line null {
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    } String[] lines = line.split(" "); lines line.split(" ") line.split line " " long a = Integer.parseInt(lines[0]); a Integer.parseInt(lines[0]) Integer.parseInt Integer lines[0] lines 0 long b = Integer.parseInt(lines[1]); b Integer.parseInt(lines[1]) Integer.parseInt Integer lines[1] lines 1 long tmp_a = a; tmp_a a long tmp_b = b; tmp_b b if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    } a<b a b {
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    } long tmp = a; tmp a a = b a b b = tmp b tmp long r=a%b; r a%b a b while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    } r!=0 r 0 {
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    } a=b a b b=r b r r=a%b r a%b a b long GCD = b; GCD b System.out.print(GCD) System.out.print System.out System System.out GCD System.out.print(" ") System.out.print System.out System System.out " " System.out.println((tmp_a*tmp_b)/GCD) System.out.println System.out System System.out (tmp_a*tmp_b)/GCD (tmp_a*tmp_b) tmp_a tmp_b GCD line = br.readLine() line br.readLine() br.readLine br String[] args args public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	}
} public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	}
} Main
import java.util.*;
import java.lang.*;
import java.io.*;

public class Main{
	public static void main (String[] args) throws java.lang.Exception{
		BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
		String line = br.readLine();
	    while(line!=null){
	        String[] lines = line.split(" ");
    	    long a = Integer.parseInt(lines[0]);
    	    long b = Integer.parseInt(lines[1]);
    	    long tmp_a = a;
    	    long tmp_b = b;
    	    
    	    if(a<b){
    	        long tmp = a;
    	        a = b;
    	        b = tmp;
    	    }
    	    long r=a%b;
    	    while(r!=0){
    	        a=b;
    	        b=r;
    	        r=a%b;
    	    }
    	    long GCD = b;
    	    System.out.print(GCD);
    	    System.out.print(" ");
    	    System.out.println((tmp_a*tmp_b)/GCD);
	        line = br.readLine();
	    }
	}
}