import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
    public static void main(String args[]){
	String str;
	try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	}
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.InputStreamReader; InputStreamReader java.io class Main{
    public static void main(String args[]){
	String str;
	try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	}
    }
} Main public static void main(String args[]){
	String str;
	try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	}
    } main {
	String str;
	try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	}
    } String str; str try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	} catch(Exception e){
	    System.exit(0);
	} Exception e {
	    System.exit(0);
	} System.exit(0) System.exit System 0 {
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	} InputStreamReader is = new InputStreamReader(System.in); is new InputStreamReader(System.in) BufferedReader br = new BufferedReader(is); br new BufferedReader(is) int[] n = new int[2]; n new int[2] 2 long[] l = new long[2]; l new long[2] 2 int temp; temp while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    } null != (str = br.readLine()) null (str = br.readLine()) str br.readLine() br.readLine br {
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    } String[] strary = str.split(" "); strary str.split(" ") str.split str " " n[0] = Integer.parseInt(strary[0]) n[0] n 0 Integer.parseInt(strary[0]) Integer.parseInt Integer strary[0] strary 0 n[1] = Integer.parseInt(strary[1]) n[1] n 1 Integer.parseInt(strary[1]) Integer.parseInt Integer strary[1] strary 1 l[0] = n[0] l[0] l 0 n[0] n 0 l[1] = n[1] l[1] l 1 n[1] n 1 while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		} n[0] != n[1] n[0] n 0 n[1] n 1 {
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		} if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    } n[0] > n[1] n[0] n 0 n[1] n 1 {
			n[0] = n[0]-n[1];
		    } n[0] = n[0]-n[1] n[0] n 0 n[0]-n[1] n[0] n 0 n[1] n 1 {
			n[1] = n[1]-n[0];
		    } n[1] = n[1]-n[0] n[1] n 1 n[1]-n[0] n[1] n 1 n[0] n 0 System.out.println(n[0]+" "+((l[0]*l[1])/n[0])) System.out.println System.out System System.out n[0]+" "+((l[0]*l[1])/n[0]) n[0]+" "+((l[0]*l[1])/n[0]) n[0] n 0 " " ((l[0]*l[1])/n[0]) (l[0]*l[1]) l[0] l 0 l[1] l 1 n[0] n 0 String args[] args
import java.io.BufferedReader;
import java.io.InputStreamReader;
class Main{
    public static void main(String args[]){
	String str;
	try{
	    InputStreamReader is = new InputStreamReader(System.in);
	    BufferedReader br = new BufferedReader(is);
	    int[] n = new int[2];
	    long[] l = new long[2];
	    int temp;
	    while(null != (str = br.readLine())){
		String[] strary = str.split(" ");
		n[0] = Integer.parseInt(strary[0]);
		n[1] = Integer.parseInt(strary[1]);
		l[0] = n[0];
		l[1] = n[1];
		while(n[0] != n[1]){
		    if(n[0] > n[1]){
			n[0] = n[0]-n[1];
		    }
		    else{
			n[1] = n[1]-n[0];
		    }
		}
		System.out.println(n[0]+" "+((l[0]*l[1])/n[0]));
	    }
	}
	catch(Exception e){
	    System.exit(0);
	}
    }
}