import java.util.*;
public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    }
} import java.util.*; util.* java public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    }
} Main static Scanner kbd = new Scanner(System.in); kbd new Scanner(System.in) public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    } main {
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    } while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	} kbd.hasNext() kbd.hasNext kbd {
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	} long a = kbd.nextLong(); a kbd.nextLong() kbd.nextLong kbd long b = kbd.nextLong(); b kbd.nextLong() kbd.nextLong kbd if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    } a>b a b {
		long w = a;
		a = b; 
		b = w;
	    } long w = a; w a a = b a b b = w b w long gcd = a; gcd a while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    } a%gcd!=0 || b%gcd!=0 a%gcd!=0 a%gcd a gcd 0 b%gcd!=0 b%gcd b gcd 0 {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    } gcd = gcd-2 gcd gcd-2 gcd 2 if(gcd==0) gcd = 1; gcd==0 gcd 0 gcd = 1 gcd 1 long lcm = a*b/gcd; lcm a*b/gcd a*b a b gcd System.out.println(gcd+" "+lcm) System.out.println System.out System System.out gcd+" "+lcm gcd+" "+lcm gcd " " lcm String[] args args public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    }
} public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    }
} Main
import java.util.*;
public class Main{
    static Scanner kbd = new Scanner(System.in);
    public static void main(String[] args){
	while(kbd.hasNext()){
	    long a = kbd.nextLong();
	    long b = kbd.nextLong();
	    //  a<bにしておく
	    if(a>b) {
		long w = a;
		a = b; 
		b = w;
	    }

	    long gcd = a;

	    while(a%gcd!=0 || b%gcd!=0) {
		gcd = gcd-2;
		if(gcd==0) gcd = 1;
	    }

	    long lcm = a*b/gcd;

	    System.out.println(gcd+" "+lcm);
	}
    }
}