import java.io.IOException;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  }
} import java.io.IOException; IOException java.io import java.math.BigInteger; BigInteger java.math import java.util.Scanner; Scanner java.util public class Main {

  public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  }
} Main public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  } main {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  } Scanner scan = new Scanner(System.in); scan new Scanner(System.in) while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    } scan.hasNextLine() scan.hasNextLine scan {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    } String line = scan.nextLine(); line scan.nextLine() scan.nextLine scan String[] vals = line.split(" "); vals line.split(" ") line.split line " " BigInteger int1 = new BigInteger(vals[0]); int1 new BigInteger(vals[0]) BigInteger int2 = new BigInteger(vals[1]); int2 new BigInteger(vals[1]) BigInteger gcd = int1.gcd(int2); gcd int1.gcd(int2) int1.gcd int1 int2 BigInteger lcm = (int1.multiply(int2)).divide(gcd); lcm (int1.multiply(int2)).divide(gcd) (int1.multiply(int2)).divide (int1.multiply(int2)) int1.multiply int1 int2 gcd System.out.println(gcd.toString() + " " + lcm.toString()) System.out.println System.out System System.out gcd.toString() + " " + lcm.toString() gcd.toString() + " " + lcm.toString() gcd.toString() gcd.toString gcd " " lcm.toString() lcm.toString lcm String[] args args public class Main {

  public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  }
} public class Main {

  public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  }
} Main
import java.io.IOException;
import java.math.BigInteger;
import java.util.Scanner;

public class Main {

  public static void main(String[] args) throws IOException {
    Scanner scan = new Scanner(System.in);
    while (scan.hasNextLine()) {
      String line = scan.nextLine();
      String[] vals = line.split(" ");
      BigInteger int1 = new BigInteger(vals[0]);
      BigInteger int2 = new BigInteger(vals[1]);

      BigInteger gcd = int1.gcd(int2);

      BigInteger lcm = (int1.multiply(int2)).divide(gcd);
      System.out.println(gcd.toString() + " " + lcm.toString());

    }
  }
}