import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class Main {
    /* Euclid???????????? */
    public static long gcd(long a, long b) {
        if(b == 0) return a;
        return gcd(b, a % b);
    }
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       }
    }
} import java.io.*; io.* java import java.util.ArrayList; ArrayList java.util import java.util.Collections; Collections java.util import java.util.Scanner; Scanner java.util class Main {
    /* Euclid???????????? */
    public static long gcd(long a, long b) {
        if(b == 0) return a;
        return gcd(b, a % b);
    }
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       }
    }
} Main /* Euclid???????????? */
    public static long gcd(long a, long b) {
        if(b == 0) return a;
        return gcd(b, a % b);
    } gcd {
        if(b == 0) return a;
        return gcd(b, a % b);
    } if(b == 0) return a; b == 0 b 0 return a; a return gcd(b, a % b); gcd(b, a % b) gcd b a % b a b long a a long b b public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       }
    } main {
       Scanner in = new Scanner(System.in);
       while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       }
    } Scanner in = new Scanner(System.in); in new Scanner(System.in) while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       } in.hasNextInt() in.hasNextInt in {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       } long a = in.nextInt(); a in.nextInt() in.nextInt in long b = in.nextInt(); b in.nextInt() in.nextInt in long gcd = gcd(a, b); gcd gcd(a, b) gcd a b long lcm = Math.abs(a*b) / gcd; lcm Math.abs(a*b) / gcd Math.abs(a*b) Math.abs Math 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
import java.io.*;
import java.util.ArrayList;
import java.util.Collections;
import java.util.Scanner;

class Main {
    /* Euclid???????????? */
    public static long gcd(long a, long b) {
        if(b == 0) return a;
        return gcd(b, a % b);
    }
    public static void main(String[] args) throws IOException {
       Scanner in = new Scanner(System.in);
       while (in.hasNextInt()) {
           long a = in.nextInt();
           long b = in.nextInt();

           long gcd = gcd(a, b);
           long lcm = Math.abs(a*b) / gcd;
           System.out.println(""+gcd+" "+lcm);
       }
    }
}