public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  }
} Main public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  } run {
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  } java.util.Scanner sc = new java.util.Scanner(in); sc new java.util.Scanner(in) int a a b b g g l; l for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    } ; sc.hasNext() sc.hasNext sc {
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    } {
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    } a = sc.nextInt() a sc.nextInt() sc.nextInt sc b = sc.nextInt() b sc.nextInt() sc.nextInt sc g = gcd(a, b) g gcd(a, b) gcd a b l = (a / g) * b l (a / g) * b (a / g) a g b System.out.println(g + " " + l) System.out.println System.out System System.out g + " " + l g + " " + l g " " l sc.close() sc.close sc java.io.InputStream in in java.io.PrintStream out out public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  } main {
    (new Main()).run(System.in, System.out);
  } (new Main()).run(System.in, System.out) (new Main()).run (new Main()) System.in System System.in System.out System System.out String[] args args private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  } gcd {
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  } if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    } a % b == 0 a % b a b 0 {
      return b;
    } return b; b {
      return gcd(b, (a % b));
    } return gcd(b, (a % b)); gcd(b, (a % b)) gcd b (a % b) a b int a a int b b public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  }
} public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  }
} Main
public class Main{
  public void run(java.io.InputStream in, java.io.PrintStream out){
    java.util.Scanner sc = new java.util.Scanner(in);
/*answer*/
    int a, b, g, l;

    for(;sc.hasNext();){
      a = sc.nextInt();
      b = sc.nextInt();

      g = gcd(a, b);
      l = (a / g) * b;

      System.out.println(g + " " + l);
    }

    sc.close();
  }
  public static void main(String[] args){
    (new Main()).run(System.in, System.out);
  }

  private static int gcd(int a, int b){
    if(a % b == 0){
      return b;
    }else{
      return gcd(b, (a % b));
    }
  }
}