import java.io.*;
import java.util.*;
 
public class Main {
 
    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    }
} import java.io.*; io.* java import java.util.*; util.* java public class Main {
 
    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    }
} Main public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    } main {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    } BufferedReader in = new BufferedReader(new InputStreamReader(System.in)); in new BufferedReader(new InputStreamReader(System.in)) StringTokenizer strToke; strToke String line; line long gcd; gcd long lcm; lcm while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        } (line = in.readLine()) != null (line = in.readLine()) line in.readLine() in.readLine in null {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        } strToke = new StringTokenizer(line) strToke new StringTokenizer(line) long a = Integer.parseInt(strToke.nextToken()); a Integer.parseInt(strToke.nextToken()) Integer.parseInt Integer strToke.nextToken() strToke.nextToken strToke long b = Integer.parseInt(strToke.nextToken()); b Integer.parseInt(strToke.nextToken()) Integer.parseInt Integer strToke.nextToken() strToke.nextToken strToke long aStock = new Long(a).longValue(); aStock new Long(a).longValue() new Long(a).longValue new Long(a) long bStock = new Long(b).longValue(); bStock new Long(b).longValue() new Long(b).longValue new Long(b) int c; c while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            } a != b a b {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            } if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                } a > b a b {
                    a = a - b;
                } a = a - b a a - b a b {
                    b = b - a;
                } b = b - a b b - a b a gcd = a gcd a lcm = (aStock * bStock) / gcd lcm (aStock * bStock) / gcd (aStock * bStock) aStock bStock gcd System.out.println(gcd + " " + lcm) System.out.println System.out System System.out gcd + " " + lcm gcd + " " + lcm gcd " " lcm String[] arg arg public class Main {
 
    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    }
} public class Main {
 
    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    }
} Main
import java.io.*;
import java.util.*;
 
public class Main {
 
    public static void main(String[] arg) throws NumberFormatException, IOException {
        BufferedReader in = new BufferedReader(new InputStreamReader(System.in));
        StringTokenizer strToke;
        String line;
        long gcd; // ?????§??¬?´???°
        long lcm; // ????°???¬?????°
 
        // ab = gcd * lcm
        while ((line = in.readLine()) != null) {
            strToke = new StringTokenizer(line);
            long a = Integer.parseInt(strToke.nextToken());
            long b = Integer.parseInt(strToke.nextToken());
            long aStock = new Long(a).longValue();
            long bStock = new Long(b).longValue();
            int c;
            while (a != b) {
                if (a > b) {
                    a = a - b;
                } else {
                    b = b - a;
                }
            }
            gcd = a;
            lcm = (aStock * bStock) / gcd;
 
            System.out.println(gcd + " " + lcm);
        }
    }
}