import java.util.*;

class Main {
  public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);
    String out = "";
    while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    }
    System.out.print(out);
  }
} import java.util.*; util.* java class Main {
  public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);
    String out = "";
    while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    }
    System.out.print(out);
  }
} Main public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);
    String out = "";
    while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    }
    System.out.print(out);
  } main {
    Scanner scanner = new Scanner(System.in);
    String out = "";
    while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    }
    System.out.print(out);
  } Scanner scanner = new Scanner(System.in); scanner new Scanner(System.in) String out = ""; out "" while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    } scanner.hasNext() scanner.hasNext scanner {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    } long m = scanner.nextLong(); m scanner.nextLong() scanner.nextLong scanner long n = scanner.nextLong(); n scanner.nextLong() scanner.nextLong scanner long orgm = m; orgm m long orgn = n; orgn n long gcd = 0; gcd 0 if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      } n > m n m {
        long temp = m;
        m = n;
        n = temp;
      } long temp = m; temp m m = n m n n = temp n temp while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      } n != 0 n 0 {
        long temp = n;
        n = m % n;
        m = temp;
      } long temp = n; temp n n = m % n n m % n m n m = temp m temp gcd = m gcd m out += gcd + " " + (orgm * orgn) / gcd + "\n" out gcd + " " + (orgm * orgn) / gcd + "\n" (orgm * orgn) / gcd gcd + " " + (orgm * orgn) / gcd + "\n" gcd " " (orgm * orgn) / gcd (orgm * orgn) orgm orgn gcd "\n" System.out.print(out) System.out.print System.out System System.out out String[] args args
import java.util.*;

class Main {
  public static void main (String[] args) {
    Scanner scanner = new Scanner(System.in);
    String out = "";
    while (scanner.hasNext()) {
      long m = scanner.nextLong();
      long n = scanner.nextLong();
      long orgm = m;
      long orgn = n;
      long gcd = 0;
      if (n > m) {
        long temp = m;
        m = n;
        n = temp;
      }
      while (n != 0) {
        long temp = n;
        n = m % n;
        m = temp;
      }
      gcd = m;
      out += gcd + " " + (orgm * orgn) / gcd + "\n";
    }
    System.out.print(out);
  }
}