import java.util.*;

public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    }
} import java.util.*; util.* java public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    }
} Main public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    } main {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        } scanner.hasNext() scanner.hasNext scanner {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        } long x0 = scanner.nextLong(); x0 scanner.nextLong() scanner.nextLong scanner long y0 = scanner.nextLong(); y0 scanner.nextLong() scanner.nextLong scanner long x = x0; x x0 long y = y0; y y0 long gcd = 0; gcd 0 long lcm = 0; lcm 0 while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            } x != y x y {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            } if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                } y > x y x {
                    long temp = y;
                    y = x;
                    x = temp;
                } long temp = y; temp y y = x y x x = temp x temp x = x - y x x - y x y gcd = x gcd x lcm = x0 * y0 /gcd lcm x0 * y0 /gcd x0 * y0 x0 y0 gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] args args public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    }
} public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    }
} Main
import java.util.*;

public class Main {
    public static void main (String[] args) {
        Scanner scanner = new Scanner(System.in);
       
        while (scanner.hasNext()) {
            long x0 = scanner.nextLong();
            long y0 = scanner.nextLong();
            
            long x = x0;
            long y = y0;
            long gcd = 0;
            long lcm = 0;
            
            while (x != y) {
                if (y > x) {
                    long temp = y;
                    y = x;
                    x = temp;
                }
                x = x - y; 
            }
            gcd = x;         
            lcm = x0 * y0 /gcd;
            System.out.println(gcd + " " + lcm);
        }
    }
}