import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    }
} 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()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    }
} Main public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    } main {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    } Scanner sc = new Scanner(System.in); sc new Scanner(System.in) while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        } sc.hasNext() sc.hasNext sc {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        } long lar = sc.nextInt(); lar sc.nextInt() sc.nextInt sc long sma = sc.nextInt(); sma sc.nextInt() sc.nextInt sc long max = lar max lar min = sma; min sma while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            } sma != 0 sma 0 {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            } lar = lar % sma lar lar % sma lar sma long freespace = lar; freespace lar lar = sma lar sma sma = freespace sma freespace System.out.println(lar + " " + (max / lar * min)) System.out.println System.out System System.out lar + " " + (max / lar * min) lar + " " + (max / lar * min) lar " " (max / lar * min) max / lar max lar min String[] args args public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    }
} public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    }
} Main
import java.util.Scanner;
public class Main {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long lar = sc.nextInt();
            long sma = sc.nextInt();
            long max = lar, min = sma;
            while (sma != 0) {
                lar = lar % sma;
                long freespace = lar;
                lar = sma;
                sma = freespace;
            }
            System.out.println(lar + " " + (max / lar * min));
        }
    }
}