public class
Main
{
  public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  }

  public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  }
} Main
{
  public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  }

  public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  }
} Main public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  } gcd {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  } if ( a == 0 ) return ( b ); a == 0 a 0 return ( b ); ( b ) return
    gcd ( b % a, a ); gcd ( b % a, a ) gcd b % a b a a int a a int b b public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  } main {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  } java.util.Scanner cin = new java.util.Scanner ( System.in ); cin new java.util.Scanner ( System.in ) while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    } cin.hasNext ( ) cin.hasNext cin {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    } int a a b; b a = cin.nextInt ( ) a cin.nextInt ( ) cin.nextInt cin b = cin.nextInt ( ) b cin.nextInt ( ) cin.nextInt cin System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b ) System.out.println System.out System System.out gcd ( a, b ) + " " + a / gcd ( a, b ) * b gcd ( a, b ) + " " + a / gcd ( a, b ) * b gcd ( a, b ) gcd a b " " a / gcd ( a, b ) * b a / gcd ( a, b ) a gcd ( a, b ) gcd a b b return ; String[ ] args args Main
{
  public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  }

  public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  }
} Main
{
  public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  }

  public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  }
} Main
public class
Main
{
  public static int
  gcd (
    int a,
    int b
    )
  {
    if ( a == 0 ) return ( b );

    return
    gcd ( b % a, a );
  }

  public static void
  main (
    String[ ] args
    )
  {
    java.util.Scanner cin = new java.util.Scanner ( System.in );

    while ( cin.hasNext ( ) )
    {
      int a, b;

      a = cin.nextInt ( ); b = cin.nextInt ( );
      System.out.println ( gcd ( a, b ) + " " + a / gcd ( a, b ) * b );
    }

    return ;
  }
}