import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	}
	
	private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	}
	
	private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	}
} Main public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	} main {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		} scan.hasNext() scan.hasNext scan {
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		} Long m = scan.nextLong(); m scan.nextLong() scan.nextLong scan Long n = scan.nextLong(); n scan.nextLong() scan.nextLong scan Long g = gcd(m, n); g gcd(m, n) gcd m n System.out.println(g+" "+(m*n/g)) System.out.println System.out System System.out g+" "+(m*n/g) g+" "+(m*n/g) g " " (m*n/g) m*n m n g String[] args args private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	} gcd {
		return (b == 0)? a:gcd(b, a%b);
	} return (b == 0)? a:gcd(b, a%b); (b == 0)? a:gcd(b, a%b) (b == 0) b 0 a gcd(b, a%b) gcd b a%b a b Long a a Long b b public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	}
	
	private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	}
} public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	}
	
	private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			Long m = scan.nextLong();
			Long n = scan.nextLong();
			Long g = gcd(m, n);
			System.out.println(g+" "+(m*n/g));
		}
	}
	
	private static Long gcd(Long a, Long b){
		return (b == 0)? a:gcd(b, a%b);
	}
}