/*
 * main.cpp
 *
 *  Created on: 2011/04/09
 *      Author: satoki
 *      10:51 ~ 11:17
 *      ツδーツクツδ環ッツドツづ個古敖渉慊法
 */
#include <iostream>
#include <string.h>
using namespace std;

int iA;
int iB;

int iGCD;
int iLCM;

bool input() {
  if (scanf("%d %d", &iA, &iB) == EOF) return false;
  return true;
}

void manage() {
  int a, b, tmp;
  a = iA;
  b = iB;
  while (b) {
    tmp = a % b;
    a = b;
    b = tmp;
  }
  iGCD = a;
  a = iA;
  b = iB;
  iLCM = a / iGCD * b;
}

int main() {
  while (1) {
    if (!input()) break;
    manage();
    printf("%d %d\n", iGCD, iLCM);
  }
}