import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
} import java.io.*; io.* java import java.util.logging.Level; Level java.util.logging import java.util.logging.Logger; Logger java.util.logging public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
} Main public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    } main {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)); br new BufferedReader(new InputStreamReader(System.in)) String str; str int i = 0; i 0 try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } IOException ex {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        } Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex) Logger.getLogger(Main.class.getName()).log Logger.getLogger(Main.class.getName()) Logger.getLogger Logger Main.class.getName() Main.class.getName Main.class Main.class Level.SEVERE Level Level.SEVERE null ex {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            } i < 50 && (str = br.readLine()) != null i < 50 i 50 (str = br.readLine()) != null (str = br.readLine()) str br.readLine() br.readLine br null {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            } String[] s = str.split(" ", 0); s str.split(" ", 0) str.split str " " 0 int x = Integer.parseInt(s[0]); x Integer.parseInt(s[0]) Integer.parseInt Integer s[0] s 0 int y = Integer.parseInt(s[1]); y Integer.parseInt(s[1]) Integer.parseInt Integer s[1] s 1 int a = x; a x int b = y; b y if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                } 0 < x && 0 < y && x < 2000000001 && y < 2000000001 x < 2000000001 0 < x && 0 < y && x < 2000000001 && y < 2000000001 0 < x 0 x 0 < y 0 y x < 2000000001 x 2000000001 y < 2000000001 y 2000000001 {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                } if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    } x < y x y {
                        int z = x;
                        x = y;
                        y = z;
                    } int z = x; z x x = y x y y = z y z while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    } y > 0 y 0 {
                        int r = x % y;
                        x = y;
                        y = r;
                    } int r = x % y; r x % y x y x = y x y y = r y r int G = x; G x int aa = a/G; aa a/G a G int bb = b/G; bb b/G b G int L = aa*bb*G; L aa*bb*G aa*bb*G aa bb G System.out.println(G + " " + L) System.out.println System.out System System.out G + " " + L G + " " + L G " " L i++ i String[] args args public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
} public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
} Main
import java.io.*;
import java.util.logging.Level;
import java.util.logging.Logger;

public class Main {

    public static void main(String[] args) {
        BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
        String str;
        int i = 0;
        try {
            while (i < 50 && (str = br.readLine()) != null) {
                String[] s = str.split(" ", 0);
                int x = Integer.parseInt(s[0]);
                int y = Integer.parseInt(s[1]);
                int a = x;
                int b = y;
                if (0 < x && 0 < y && x < 2000000001 && y < 2000000001) {
                    if (x < y) {
                        int z = x;
                        x = y;
                        y = z;
                    }
                    while (y > 0) {
                        int r = x % y;
                        x = y;
                        y = r;
                    }
                    int G = x;
                    int aa = a/G;
                    int bb = b/G;
                    int L = aa*bb*G;
                    System.out.println(G + " " + L);
                    i++;
                }
            }
        } catch (IOException ex) {
            Logger.getLogger(Main.class.getName()).log(Level.SEVERE, null, ex);
        }
    }
}