import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }

  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  }

  private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  }

  private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  }
} import java.io.BufferedReader; BufferedReader java.io import java.io.IOException; IOException java.io import java.io.InputStreamReader; InputStreamReader java.io public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }

  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  }

  private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  }

  private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  }
} Main public static void main(String[] args) {
    
    new Main().run();
  } main {
    
    new Main().run();
  } new Main().run() new Main().run new Main() String[] args args public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  } run {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  } try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    } catch( IOException e) {
      System.out.println("IOException!");
    } IOException e {
      System.out.println("IOException!");
    } System.out.println("IOException!") System.out.println System.out System System.out "IOException!" {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    } BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) BufferedReader br = new BufferedReader(new InputStreamReader(System.in)) new BufferedReader(new InputStreamReader(System.in)) String line; line String[] num; num int a a b b t t gdc; gdc long lcm; lcm StringBuilder result = new StringBuilder(); result new StringBuilder() while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      } true {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      } if( ((line = br.readLine()) == null) || line.isEmpty() ) break; ((line = br.readLine()) == null) || line.isEmpty() ((line = br.readLine()) == null) (line = br.readLine()) line br.readLine() br.readLine br null line.isEmpty() line.isEmpty line break; num = line.split(" ") num line.split(" ") line.split line " " a = Integer.parseInt(num[0]) a Integer.parseInt(num[0]) Integer.parseInt Integer num[0] num 0 b = Integer.parseInt(num[1]) b Integer.parseInt(num[1]) Integer.parseInt Integer num[1] num 1 if( a<b ) {
          t=a; a=b; b=t;
        } a<b a b {
          t=a; a=b; b=t;
        } t=a t a a=b a b b=t b t gdc = gdc(a, b) gdc gdc(a, b) gdc a b lcm = lcm(a, b, gdc) lcm lcm(a, b, gdc) lcm a b gdc result.append(gdc).append(" ").append(lcm).append("\n") result.append(gdc).append(" ").append(lcm).append result.append(gdc).append(" ").append(lcm) result.append(gdc).append(" ").append result.append(gdc).append(" ") result.append(gdc).append result.append(gdc) result.append result gdc " " lcm "\n" System.out.print(result) System.out.print System.out System System.out result private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  } gdc {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  } int d = x%y; d x%y x y if( d == 0 ) return y;
    else return gdc(y, d); d == 0 d 0 return y; y return gdc(y, d); gdc(y, d) gdc y d int x x int y y private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  } lcm {
    return x * y / gdc;
  } return x * y / gdc; x * y / gdc x * y x y gdc long x x long y y int gdc gdc public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }

  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  }

  private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  }

  private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  }
} public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }

  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  }

  private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  }

  private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  }
} Main
import java.io.BufferedReader;
import java.io.IOException;
import java.io.InputStreamReader;

public class Main {

  public static void main(String[] args) {
    
    new Main().run();
  }

  public void run() {

    try(BufferedReader br = new BufferedReader(new InputStreamReader(System.in))) {

      String line;
      String[] num;
      int a,b,t,gdc;
      long lcm;
      StringBuilder result = new StringBuilder();
      while(true) {

        if( ((line = br.readLine()) == null) || line.isEmpty() ) break;

        num = line.split(" ");
        a = Integer.parseInt(num[0]);
        b = Integer.parseInt(num[1]);
        if( a<b ) {
          t=a; a=b; b=t;
        }

        gdc = gdc(a, b);
        lcm = lcm(a, b, gdc);

        result.append(gdc).append(" ").append(lcm).append("\n");
      }

      System.out.print(result);
    }
    catch( IOException e) {
      System.out.println("IOException!");
    }
  }

  private int gdc(int x, int y) {
    int d = x%y;
    if( d == 0 ) return y;
    else return gdc(y, d);
  }

  private long lcm(long x, long y, int gdc) {
    return x * y / gdc;
  }
}
