import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
} import java.util.*; util.* java public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
} Main private static final Scanner scan = new Scanner(System.in); scan new Scanner(System.in) public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	} main {
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	} List<Integer> listG = new ArrayList<Integer>(); listG new ArrayList<Integer>() List<Integer> listL = new ArrayList<Integer>(); listL new ArrayList<Integer>() while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		} scan.hasNext() scan.hasNext scan {
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		} int a = scan.nextInt(); a scan.nextInt() scan.nextInt scan int b = scan.nextInt(); b scan.nextInt() scan.nextInt scan int g = gcd(a, b); g gcd(a, b) gcd a b int l = lcm(a, b, g); l lcm(a, b, g) lcm a b g listG.add(g) listG.add listG g listL.add(l) listL.add listL l Iterator<Integer> itG = listG.iterator(); itG listG.iterator() listG.iterator listG Iterator<Integer> itL = listL.iterator(); itL listL.iterator() listL.iterator listL while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		} itG.hasNext() itG.hasNext itG {
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		} int g = itG.next(); g itG.next() itG.next itG int l = itL.next(); l itL.next() itL.next itL System.out.printf("%d %d\n", g, l) System.out.printf System.out System System.out "%d %d\n" g l String[] args args public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	} gcd {
		if(b != 0)return gcd(b, a % b);
		else return a;
	} if(b != 0)return gcd(b, a % b);
		else return a; b != 0 b 0 return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b return a; a int a a int b b public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	} lcm {
		int v = a / g;
		int l = v * b;
		return l;
	} int v = a / g; v a / g a g int l = v * b; l v * b v b return l; l int a a int b b int g g public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
} public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
} Main
import java.util.*;

public class Main{
	private static final Scanner scan = new Scanner(System.in);

	public static void main(String[] args){
		List<Integer> listG = new ArrayList<Integer>();
		List<Integer> listL = new ArrayList<Integer>();
		while(scan.hasNext()){
			int a = scan.nextInt();
			int b = scan.nextInt();
			int g = gcd(a, b);
			int l = lcm(a, b, g);
			listG.add(g);
			listL.add(l);
		}
		Iterator<Integer> itG = listG.iterator();
		Iterator<Integer> itL = listL.iterator();
		while(itG.hasNext()){
			int g = itG.next();
			int l = itL.next();
			System.out.printf("%d %d\n", g, l);
		}
	}

	public static int gcd(int a, int b){
		if(b != 0)return gcd(b, a % b);
		else return a;
	}

	public static int lcm(int a, int b, int g){
		int v = a / g;
		int l = v * b;
		return l;
	}
}