
import java.util.Scanner;

class Main{
	static class Pair{
		public long x, y;
		Pair( long xx, long yy ){ x=xx; y=yy; }
	}
	public static void main(String[]av){
		Scanner sc = new Scanner( System.in );
		java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
		while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		}
		for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		}
	}
}
				 import java.util.Scanner; Scanner java.util class Main{
	static class Pair{
		public long x, y;
		Pair( long xx, long yy ){ x=xx; y=yy; }
	}
	public static void main(String[]av){
		Scanner sc = new Scanner( System.in );
		java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
		while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		}
		for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		}
	}
} Main public static void main(String[]av){
		Scanner sc = new Scanner( System.in );
		java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
		while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		}
		for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		}
	} main {
		Scanner sc = new Scanner( System.in );
		java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
		while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		}
		for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		}
	} Scanner sc = new Scanner( System.in ); sc new Scanner( System.in ) java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>(); list new java.util.ArrayList<Pair>() while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		} sc.hasNextInt() sc.hasNextInt sc {
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		} long x = sc.nextInt(); x sc.nextInt() sc.nextInt sc long y = sc.nextInt(); y sc.nextInt() sc.nextInt sc list.add( new Pair( Math.max(x,y), Math.min(x,y))) list.add list new Pair( Math.max(x,y), Math.min(x,y)) for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		} Pair p list {
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		} {
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		} long x = p.x; x p.x p p.x long y = p.y; y p.y p p.y do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y ); 0 < y 0 y {
				long	z = x % y;
				x = y;
				y = z;
			} long	z = x % y; z x % y x y x = y x y y = z y z System.out.println( x + " " + p.x*p.y/x ) System.out.println System.out System System.out x + " " + p.x*p.y/x x + " " + p.x*p.y/x x " " p.x*p.y/x p.x*p.y p.x p p.x p.y p p.y x String[]av av static class Pair{
		public long x, y;
		Pair( long xx, long yy ){ x=xx; y=yy; }
	} Pair public long x x y; y Pair( long xx, long yy ){ x=xx; y=yy; } Pair { x=xx; y=yy; } x=xx x xx y=yy y yy long xx xx long yy yy

import java.util.Scanner;

class Main{
	static class Pair{
		public long x, y;
		Pair( long xx, long yy ){ x=xx; y=yy; }
	}
	public static void main(String[]av){
		Scanner sc = new Scanner( System.in );
		java.util.ArrayList<Pair> list = new java.util.ArrayList<Pair>();
		while( sc.hasNextInt() )	{
			long x = sc.nextInt();
			long y = sc.nextInt();
			list.add( new Pair( Math.max(x,y), Math.min(x,y)));
		}
		for ( Pair p : list ){
			long x = p.x;
			long y = p.y;
			do{
				long	z = x % y;
				x = y;
				y = z;
			}while( 0 < y );
			System.out.println( x + " " + p.x*p.y/x );
		}
	}
}
				