import java.io.IOException;
import java.util.Scanner;

public class Main {
    private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    }
    
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    }
} import java.io.IOException; IOException java.io import java.util.Scanner; Scanner java.util public class Main {
    private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    }
    
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    }
} Main private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    } gcd { 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    } if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        } b==0 b 0 {
            return a;
        } return a; a {
            return gcd(b,a%b);
        } return gcd(b,a%b); gcd(b,a%b) gcd b a%b a b int a a int b b public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        } sc.hasNext() sc.hasNext sc {
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        } int v1 = sc.nextInt(); v1 sc.nextInt() sc.nextInt sc int v2 = sc.nextInt(); v2 sc.nextInt() sc.nextInt sc if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            } v1>=v2 v1 v2 {
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            } int ans = gcd(v1,v2); ans gcd(v1,v2) gcd v1 v2 System.out.print(ans + " ") System.out.print System.out System System.out ans + " " ans " " System.out.println(v1/ans*v2) System.out.println System.out System System.out v1/ans*v2 v1/ans v1 ans v2 {
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            } int ans = gcd(v2,v1); ans gcd(v2,v1) gcd v2 v1 System.out.print(ans + " ") System.out.print System.out System System.out ans + " " ans " " System.out.println(v1/ans*v2) System.out.println System.out System System.out v1/ans*v2 v1/ans v1 ans v2 String[] args args public class Main {
    private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    }
    
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    }
} public class Main {
    private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    }
    
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    }
} Main
import java.io.IOException;
import java.util.Scanner;

public class Main {
    private static int gcd(int a, int b){ 
        if (b==0){
            return a;
        }else{
            return gcd(b,a%b);
        }
    }
    
    public static void main(String[] args) throws IOException {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()){
            int v1 = sc.nextInt();
            int v2 = sc.nextInt();
            if (v1>=v2){
                int ans = gcd(v1,v2);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }else{
                int ans = gcd(v2,v1);
                System.out.print(ans + " ");
                System.out.println(v1/ans*v2);
            }
        }
    }
}