
import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    }

    public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    }

    public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    }
} import java.io.*; io.* java import java.math.BigInteger; BigInteger java.math import java.util.*; util.* java public class Main {

    public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    }

    public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    }

    public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    }
} Main public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    } main {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        } true {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        } String s = in.readLine(); s in.readLine() in.readLine in if (s == null || s.length() < 1) {
                break;
            } s == null || s.length() < 1 s == null s null s.length() < 1 s.length() s.length s 1 {
                break;
            } break; f(s) f s String[] argv argv public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    } f {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    } String[] sp = s.split(" "); sp s.split(" ") s.split s " " BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0])); a BigInteger.valueOf(Integer.parseInt(sp[0])) BigInteger.valueOf BigInteger Integer.parseInt(sp[0]) Integer.parseInt Integer sp[0] sp 0 BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1])); b BigInteger.valueOf(Integer.parseInt(sp[1])) BigInteger.valueOf BigInteger Integer.parseInt(sp[1]) Integer.parseInt Integer sp[1] sp 1 if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        } a.compareTo(b) == -1 a.compareTo(b) a.compareTo a b -1 1 {
            BigInteger temp = a;
            a = b;
            b = temp;
        } BigInteger temp = a; temp a a = b a b b = temp b temp System.out.println(a.gcd(b) + " " + lcm(a, b)) System.out.println System.out System System.out a.gcd(b) + " " + lcm(a, b) a.gcd(b) + " " + lcm(a, b) a.gcd(b) a.gcd a b " " lcm(a, b) lcm a b String s s public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    } lcm {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    } final BigInteger gcd = m.gcd(n); gcd m.gcd(n) m.gcd m n if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        } gcd.compareTo(BigInteger.ZERO) == 0 gcd.compareTo(BigInteger.ZERO) gcd.compareTo gcd BigInteger.ZERO BigInteger BigInteger.ZERO 0 {
            return BigInteger.ZERO;
        } return BigInteger.ZERO; BigInteger.ZERO BigInteger BigInteger.ZERO return m.multiply(n).divide(gcd); m.multiply(n).divide(gcd) m.multiply(n).divide m.multiply(n) m.multiply m n gcd BigInteger m m BigInteger n n public class Main {

    public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    }

    public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    }

    public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    }
} public class Main {

    public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    }

    public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    }

    public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    }
} Main

import java.io.*;
import java.math.BigInteger;
import java.util.*;

public class Main {

    public static void main(String[] argv) throws IOException {
        //*
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        while(true) {
            String s = in.readLine();
            if (s == null || s.length() < 1) {
                break;
            }
            f(s);
        }
        /*/
        f("8 6");
        f("50000000 30000000");
        //*/
    }

    public static void f(String s) {
        String[] sp = s.split(" ");
        BigInteger a = BigInteger.valueOf(Integer.parseInt(sp[0]));
        BigInteger b = BigInteger.valueOf(Integer.parseInt(sp[1]));
        if (a.compareTo(b) == -1) {
            BigInteger temp = a;
            a = b;
            b = temp;
        }
        System.out.println(a.gcd(b) + " " + lcm(a, b));
    }

    public static BigInteger lcm(BigInteger m, BigInteger n) {
        final BigInteger gcd = m.gcd(n);
        if (gcd.compareTo(BigInteger.ZERO) == 0) {
            return BigInteger.ZERO;
        }
        return m.multiply(n).divide(gcd);
    }
}