
import java.util.*;
public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

} import java.util.*; util.* java public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

} Main public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	} doIt {
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	} Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		} sc.hasNext() sc.hasNext sc {
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		} int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int x = a; x a int y = b; y b if(x < y){
				int temp = x;
				x = y;
				y = temp;
			} x < y x y {
				int temp = x;
				x = y;
				y = temp;
			} int temp = x; temp x x = y x y y = temp y temp while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			} y != 0 y 0 {
				int temp = x % y;
				x = y;
				y = temp;
			} int temp = x % y; temp x % y x y x = y x y y = temp y temp long lcm = (long)a * b / x; lcm (long)a * b / x (long)a * b (long)a b x System.out.println(x + " " + lcm) System.out.println System.out System System.out x + " " + lcm x + " " + lcm x " " lcm public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	} main {
		Main obj = new Main();
		obj.doIt();

	} Main obj = new Main(); obj new Main() obj.doIt() obj.doIt obj String[] args args public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

} public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

} Main

import java.util.*;
public class Main {

	public void doIt(){
		Scanner sc = new Scanner(System.in);

		while(sc.hasNext()){
			int a = sc.nextInt();
			int b = sc.nextInt();
			int x = a;
			int y = b;
			if(x < y){
				int temp = x;
				x = y;
				y = temp;
			}
			//ツ催妥・ツ古カツ姪アツ青板づーツ仰づ淞づゥ
			while(y != 0){
				int temp = x % y;
				x = y;
				y = temp;
			}
			long lcm = (long)a * b / x;
			System.out.println(x + " " + lcm);

		}
	}
	public static void main(String[] args) {
		Main obj = new Main();
		obj.doIt();

	}

}