import java.util.Scanner;

class Main {

    public static long euclid (long a, long b) {
	if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	}
    }
    
    public static void main (String args[]) {
	Scanner scan = new Scanner(System.in);
	long a, b, G, L;

	while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	}
    }
} import java.util.Scanner; Scanner java.util class Main {

    public static long euclid (long a, long b) {
	if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	}
    }
    
    public static void main (String args[]) {
	Scanner scan = new Scanner(System.in);
	long a, b, G, L;

	while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	}
    }
} Main public static long euclid (long a, long b) {
	if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	}
    } euclid {
	if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	}
    } if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	} b == 0 b 0 {
	    return a;
	} return a; a {
	    return euclid (b, a%b);
	} return euclid (b, a%b); euclid (b, a%b) euclid b a%b a b long a a long b b public static void main (String args[]) {
	Scanner scan = new Scanner(System.in);
	long a, b, G, L;

	while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	}
    } main {
	Scanner scan = new Scanner(System.in);
	long a, b, G, L;

	while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	}
    } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) long a a b b G G L; L while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	} scan.hasNext() scan.hasNext scan {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	} a = scan.nextLong() a scan.nextLong() scan.nextLong scan b = scan.nextLong() b scan.nextLong() scan.nextLong scan if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    } a < b a b {
		long tmp = a;
		a = b;
		b = tmp;
	    } long tmp = a; tmp a a = b a b b = tmp b tmp G = euclid (a, b) G euclid (a, b) euclid a b L = a*b/G L a*b/G a*b a b G System.out.println(G+" "+L) System.out.println System.out System System.out G+" "+L G+" "+L G " " L String args[] args
import java.util.Scanner;

class Main {

    public static long euclid (long a, long b) {
	if (b == 0) {
	    return a;
	}
	else {
	    return euclid (b, a%b);
	}
    }
    
    public static void main (String args[]) {
	Scanner scan = new Scanner(System.in);
	long a, b, G, L;

	while (scan.hasNext()) {
	    a = scan.nextLong();
	    b = scan.nextLong();

	    if (a < b) {
		long tmp = a;
		a = b;
		b = tmp;
	    }

	    G = euclid (a, b);
	    L = a*b/G;

	    System.out.println(G+" "+L);
	}
    }
}