import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	}

	static int goc(int a, int b) {
		if (b != 0) return goc(b, a % b);
		else return a;
	}
} import java.util.Scanner; Scanner java.util public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	}

	static int goc(int a, int b) {
		if (b != 0) return goc(b, a % b);
		else return a;
	}
} Main public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	} main {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	} Scanner in = new Scanner(System.in); in new Scanner(System.in) int a a b b goc; goc while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		} in.hasNext() in.hasNext in {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		} a = in.nextInt() a in.nextInt() in.nextInt in b = in.nextInt() b in.nextInt() in.nextInt in System.out.print(goc = goc(a, b)) System.out.print System.out System System.out goc = goc(a, b) goc goc(a, b) goc a b System.out.print(" ") System.out.print System.out System System.out " " System.out.println(a / goc * b) System.out.println System.out System System.out a / goc * b a / goc a goc b String[] args args static int goc(int a, int b) {
		if (b != 0) return goc(b, a % b);
		else return a;
	} goc {
		if (b != 0) return goc(b, a % b);
		else return a;
	} if (b != 0) return goc(b, a % b);
		else return a; b != 0 b 0 return goc(b, a % b); goc(b, a % b) goc b a % b a b return a; a int a a int b b public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	}

	static int goc(int a, int b) {
		if (b != 0) return goc(b, a % b);
		else return a;
	}
} public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	}

	static int goc(int a, int b) {
		if (b != 0) return goc(b, a % b);
		else return a;
	}
} Main
import java.util.Scanner;

public class Main {
	public static void main(String[] args) {
		Scanner in = new Scanner(System.in);
		int a, b, goc;
		while (in.hasNext()) {
			a = in.nextInt();
			b = in.nextInt();
			System.out.print(goc = goc(a, b));
			System.out.print(" ");
			System.out.println(a / goc * b);
		}
	}

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