
import java.util.*;
import java.lang.*;
import java.math.*;

public class Main {
	
	Scanner sc = new Scanner(System.in);
	
	void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	}
	
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} import java.util.*; util.* java import java.lang.*; lang.* java import java.math.*; math.* java public class Main {
	
	Scanner sc = new Scanner(System.in);
	
	void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	}
	
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} Main Scanner sc = new Scanner(System.in); sc new Scanner(System.in) void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	} run {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	} long x x y y z; z long first first second; second long tmp; tmp while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		} sc.hasNext() sc.hasNext sc {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		} first = sc.nextLong() first sc.nextLong() sc.nextLong sc second = sc.nextLong() second sc.nextLong() sc.nextLong sc x = first x first y = second y second if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			} x<y x y {
				tmp = x;
				x = y;
				y = tmp;
			} tmp = x tmp x x = y x y y = tmp y tmp do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0); z!=0 z 0 {
				z = x % y;
				x = y;
				y = z;
			} z = x % y z x % y x y x = y x y y = z y z System.out.println(x + " " + first * second / x ) System.out.println System.out System System.out x + " " + first * second / x x + " " + first * second / x x " " first * second / x first * second first second x public static void main(String[] args) {
		
		new Main().run();
		
	} main {
		
		new Main().run();
		
	} new Main().run() new Main().run new Main() String[] args args public class Main {
	
	Scanner sc = new Scanner(System.in);
	
	void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	}
	
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} public class Main {
	
	Scanner sc = new Scanner(System.in);
	
	void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	}
	
	public static void main(String[] args) {
		
		new Main().run();
		
	}
} Main

import java.util.*;
import java.lang.*;
import java.math.*;

public class Main {
	
	Scanner sc = new Scanner(System.in);
	
	void run() {
		
		long x,y,z;
		long first,second;
		long tmp;
		
		while (sc.hasNext()) {
			
			first = sc.nextLong();
			second = sc.nextLong();
			
			x = first;
			y = second;
			
			if (x<y) {
				tmp = x;
				x = y;
				y = tmp;
			}
			
			do {
				z = x % y;
				x = y;
				y = z;
			} while (z!=0);
			
			System.out.println(x + " " + first * second / x );
			
		}
		
	}
	
	public static void main(String[] args) {
		
		new Main().run();
		
	}
}