import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    }

    static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    }
} import java.util.Scanner; Scanner java.util public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    }

    static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    } main {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        } sc.hasNext() sc.hasNext sc {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        } int a = sc.nextInt(); a sc.nextInt() sc.nextInt sc int b = sc.nextInt(); b sc.nextInt() sc.nextInt sc int GCD = GCD(a, b); GCD GCD(a, b) GCD a b int LCM = a / GCD * b; LCM a / GCD * b a / GCD a GCD b System.out.println(GCD + " " + LCM) System.out.println System.out System System.out GCD + " " + LCM GCD + " " + LCM GCD " " LCM sc.close() sc.close sc String[] args args static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    } GCD {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    } if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        } a < b a b {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            } b % a == 0 b % a b a 0 {
                return a;
            } return a; a {
                return GCD(a, b % a);
            } return GCD(a, b % a); GCD(a, b % a) GCD a b % a b a {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        } if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            } a % b == 0 a % b a b 0 {
                return b;
            } return b; b {
                return GCD(a % b, b);
            } return GCD(a % b, b); GCD(a % b, b) GCD a % b a b b int a a int b b public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    }

    static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    }

    static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    }
} Main
import java.util.Scanner;

public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            int a = sc.nextInt();
            int b = sc.nextInt();
            int GCD = GCD(a, b);
            int LCM = a / GCD * b;
            System.out.println(GCD + " " + LCM);
        }
        sc.close();
    }

    static int GCD(int a, int b) {
        if (a < b) {
            if (b % a == 0) {
                return a;
            } else {
                return GCD(a, b % a);
            }
        } else {
            if (a % b == 0) {
                return b;
            } else {
                return GCD(a % b, b);
            }
        }
    }
}
