import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    }
    
    private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    }
} import java.util.*; util.* java public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    }
    
    private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    }
} Main private static final Scanner scn = new Scanner(System.in); scn new Scanner(System.in) public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    } main {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    } while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        } scn.hasNextInt() scn.hasNextInt scn {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        } int a = scn.nextInt() a scn.nextInt() scn.nextInt scn b = scn.nextInt(); b scn.nextInt() scn.nextInt scn int c = euclid(a > b ? a : b, a < b ? a : b); c euclid(a > b ? a : b, a < b ? a : b) euclid a > b ? a : b a > b a b a b a < b ? a : b a < b a b a b System.out.println(c + " " + (long)a * b / c) System.out.println System.out System System.out c + " " + (long)a * b / c c + " " + (long)a * b / c c " " (long)a * b / c (long)a * b (long)a b c String[] args args private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    } euclid {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    } if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        } y > 0 y 0 {
            return euclid(y, x % y);
        } return euclid(y, x % y); euclid(y, x % y) euclid y x % y x y {
            return x;
        } return x; x int x x int y y public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    }
    
    private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    }
} public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    }
    
    private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    }
} Main
import java.util.*;

public class Main {
    private static final Scanner scn = new Scanner(System.in);
    
    public static void main(String[] args) {
        while(scn.hasNextInt()) {
            int a = scn.nextInt(), b = scn.nextInt();
            int c = euclid(a > b ? a : b, a < b ? a : b);
            System.out.println(c + " " + (long)a * b / c);
        }
    }
    
    private static int euclid(int x, int y) {
        if(y > 0) {
            return euclid(y, x % y);
        } else {
            return x;
        }
    }
}