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

public class Main {
	static ArrayList<String> allpermutations;
	public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	}
} import java.math.BigInteger; BigInteger java.math import java.util.ArrayList; ArrayList java.util import java.util.Scanner; Scanner java.util public class Main {
	static ArrayList<String> allpermutations;
	public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	}
} Main static ArrayList<String> allpermutations; allpermutations public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	} main {
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	} Scanner cin = new Scanner(System.in); cin new Scanner(System.in) long a; a long b; b BigInteger aVal; aVal BigInteger bVal; bVal BigInteger gcd; gcd BigInteger lcm; lcm while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		} cin.hasNextLong() cin.hasNextLong cin {
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		} a = cin.nextLong() a cin.nextLong() cin.nextLong cin b = cin.nextLong() b cin.nextLong() cin.nextLong cin aVal = BigInteger.valueOf(a) aVal BigInteger.valueOf(a) BigInteger.valueOf BigInteger a bVal = BigInteger.valueOf(b) bVal BigInteger.valueOf(b) BigInteger.valueOf BigInteger b gcd = aVal.gcd(bVal) gcd aVal.gcd(bVal) aVal.gcd aVal bVal lcm = (aVal.multiply(bVal)).divide(gcd) lcm (aVal.multiply(bVal)).divide(gcd) (aVal.multiply(bVal)).divide (aVal.multiply(bVal)) aVal.multiply aVal bVal 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 ArrayList<String> allpermutations;
	public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	}
} public class Main {
	static ArrayList<String> allpermutations;
	public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	}
} Main
import java.math.BigInteger;
import java.util.ArrayList;
import java.util.Scanner;

public class Main {
	static ArrayList<String> allpermutations;
	public static void main(String[] args){
		Scanner cin = new Scanner(System.in);
		long a;
		long b;
		BigInteger aVal;
		BigInteger bVal;
		BigInteger gcd;
		BigInteger lcm;
		while(cin.hasNextLong()){
			a = cin.nextLong();
			b = cin.nextLong();
			aVal = BigInteger.valueOf(a);
			bVal = BigInteger.valueOf(b);
			gcd = aVal.gcd(bVal);
			lcm = (aVal.multiply(bVal)).divide(gcd);
			System.out.println(gcd + " " + lcm);
		}
	}
}