#include <stdio.h>

int main(){

	int a=0, b=0,i=0,m=0,n=0,B=0,A=0;

	scanf("%d%d", &a, &b);
	B = b;
	A = a;
	if (a < b){
		i = a;
		a = b;
		b = i;
	}

	while(1){

		n = a%b;
		if (n == 0){
			printf("%d ",b);
			break;
		}
		m = n;
		n = b%m;
		b = m;
	}
	m = A*B;
	m /= b;

	printf("%d\n", m);

	return 0;
}