import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	}

} import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	}

} Main /**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	} main {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	} Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		} scan.hasNext() scan.hasNext scan {
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		} BigInteger a = new BigInteger(scan.next()); a new BigInteger(scan.next()) BigInteger b = new BigInteger(scan.next()); b new BigInteger(scan.next()) System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue()) System.out.println System.out System System.out a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue() a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue() a.gcd(b) a.gcd a b " " (long)a.intValue()*b.intValue()/a.gcd(b).intValue() (long)a.intValue()*b.intValue() (long)a.intValue() a.intValue a b.intValue() b.intValue b a.gcd(b).intValue() a.gcd(b).intValue a.gcd(b) a.gcd a b String[] args args public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	}

} public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	}

} Main
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

	/**
	 * @param args
	 */
	public static void main(String[] args) {
		// TODO 自動生成されたメソッド・スタブ


		Scanner scan = new Scanner(System.in);
		while(scan.hasNext()){
			BigInteger a = new BigInteger(scan.next());
			BigInteger b = new BigInteger(scan.next());
			System.out.println(a.gcd(b)+" "+(long)a.intValue()*b.intValue()/a.gcd(b).intValue());
		}
	}

}