import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by Reopard on 2014/05/06.
 */
public class Main {
    public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    }

    static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {
    public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    }

    static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    }
} Main public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    } main {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    } long a a b b gcd gcd lcm; lcm String line; line String number[]; number BufferedReader reader = new BufferedReader(new InputStreamReader(System.in)); reader new BufferedReader(new InputStreamReader(System.in)) try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        } catch(IOException e){
            System.exit(0);
        } IOException e {
            System.exit(0);
        } System.exit(0) System.exit System 0 {
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        } while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            } (line = reader.readLine()) != null (line = reader.readLine()) line reader.readLine() reader.readLine reader null {
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            } number = line.split(" ") number line.split(" ") line.split line " " a = Long.parseLong(number[0]) a Long.parseLong(number[0]) Long.parseLong Long number[0] number 0 b = Long.parseLong(number[1]) b Long.parseLong(number[1]) Long.parseLong Long number[1] number 1 if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a); a > b a b gcd = GCD(a, b) gcd GCD(a, b) GCD a b gcd = GCD(b, a) gcd GCD(b, a) GCD b a lcm = a*b/gcd lcm a*b/gcd a*b a b gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String args[] args static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    } GCD {
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    } long tmp; tmp if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b; a%b != 0 a%b a b 0 {
            tmp = GCD(b, a%b);
        } tmp = GCD(b, a%b) tmp GCD(b, a%b) GCD b a%b a b return b; b return tmp; tmp long a a long b b public class Main {
    public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    }

    static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    }
} public class Main {
    public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    }

    static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

/**
 * Created by Reopard on 2014/05/06.
 */
public class Main {
    public static void main(String args[]) {
        long a, b, gcd, lcm;
        String line;
        String number[];
        BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
        try{
            while((line = reader.readLine()) != null){
                number = line.split(" ");
                a = Long.parseLong(number[0]);
                b = Long.parseLong(number[1]);
                if(a > b) gcd = GCD(a, b);
                else gcd = GCD(b, a);
                lcm = a*b/gcd;
                System.out.println(gcd + " " + lcm);
            }
        }catch(IOException e){
            System.exit(0);
        }
    }

    static long GCD(long a, long b){
        long tmp;
        if(a%b != 0){
            tmp = GCD(b, a%b);
        }else return b;
        return tmp;
    }
}