import java.util.*;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	}
    }
} import java.util.*; util.* java class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	}
    }
} Main public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	}
    } main {
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	}
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	} sc.hasNext() sc.hasNext sc {
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	} long a = sc.nextInt(); a sc.nextInt() sc.nextInt sc long b = sc.nextInt(); b sc.nextInt() sc.nextInt sc long smaller = a; smaller a long larger = b; larger b if(b<smaller){smaller = b; larger = a;} b<smaller b smaller {smaller = b; larger = a;} smaller = b smaller b larger = a larger a long aa = a; aa a long bb = b; bb b while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    } bb!=0 bb 0 {
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    } long tmp = bb; tmp bb bb = aa%bb bb aa%bb aa bb aa = tmp aa tmp long lcm = (a*b)/aa; lcm (a*b)/aa (a*b) a b aa System.out.println(aa+" "+lcm) System.out.println System.out System System.out aa+" "+lcm aa+" "+lcm aa " " lcm String[] args args
import java.util.*;

class Main{
    public static void main(String[] args){
	Scanner sc = new Scanner(System.in);

	while(sc.hasNext()){
	    long a = sc.nextInt();
	    long b = sc.nextInt();
	    
	    long smaller = a;
	    long larger = b;
	    if(b<smaller){smaller = b; larger = a;}
	    
	    long aa = a;
	    long bb = b;
	    while(bb!=0){
		long tmp = bb;
		bb = aa%bb;
		aa = tmp;
	    }

	    long lcm = (a*b)/aa;
	    
	    System.out.println(aa+" "+lcm);
	}
    }
}