import java.util.*;

class GL {
	public long GCD,LCM;

	public GL(long a,long b){
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	}
	private long gcd(long a,long b){
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	}
}

public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
} import java.util.*; util.* java class GL {
	public long GCD,LCM;

	public GL(long a,long b){
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	}
	private long gcd(long a,long b){
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	}
} GL public long GCD GCD LCM; LCM public GL(long a,long b){
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	} GL {
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	} long g = gcd(a,b); g gcd(a,b) gcd a b this.GCD = g this.GCD this this.GCD g this.LCM = a * b / g this.LCM this this.LCM a * b / g a * b a b g long a a long b b private long gcd(long a,long b){
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	} gcd {
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	} while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		} a != b a b {
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		} if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			} a < b a b {
				b -= a;
			} b -= a b a if( a > b ){
				a -= b;
			} a > b a b {
				a -= b;
			} a -= b a b return a; a long a a long b b public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
} Main public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	} main {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	} ArrayList<GL> ar = new ArrayList<GL>(); ar new ArrayList<GL>() Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator")); sc new Scanner(System.in).useDelimiter(System.getProperty("line.separator")) new Scanner(System.in).useDelimiter new Scanner(System.in) System.getProperty("line.separator") System.getProperty System "line.separator" String[] s; s while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         } sc.hasNext() sc.hasNext sc {
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         } s = sc.next().split("\\s") s sc.next().split("\\s") sc.next().split sc.next() sc.next sc "\\s" ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1]))) ar.add ar new GL(Long.parseLong(s[0]),Long.parseLong(s[1])) for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);} GL g ar {System.out.println(g.GCD + " " + g.LCM);} {System.out.println(g.GCD + " " + g.LCM);} System.out.println(g.GCD + " " + g.LCM) System.out.println System.out System System.out g.GCD + " " + g.LCM g.GCD + " " + g.LCM g.GCD g g.GCD " " g.LCM g g.LCM String[] args args public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
} public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
} Main
import java.util.*;

class GL {
	public long GCD,LCM;

	public GL(long a,long b){
		long g = gcd(a,b);
		this.GCD = g;
		this.LCM = a * b / g;
	}
	private long gcd(long a,long b){
		while( a != b ){
			if( a < b ){
				b -= a;
			} else if( a > b ){
				a -= b;
			}
		}
		return a;
	}
}

public class Main {
	public static void main(String[] args) {

		ArrayList<GL> ar = new ArrayList<GL>();

		//input
		Scanner sc = new Scanner(System.in).useDelimiter(System.getProperty("line.separator"));
		String[] s;
         while(sc.hasNext()){
             s = sc.next().split("\\s");
             ar.add(new GL(Long.parseLong(s[0]),Long.parseLong(s[1])));
         }
		
         //output
         for(GL g:ar){System.out.println(g.GCD + " " + g.LCM);}
	}
}