#include <stdio.h>

int main(){

	int a = 0, s = 0, d = 0, f = 0, A = 0, S = 0;


		A = a;
		S = s;

		if (a < s){
			d = a;
			a = s;
			s = d;
		}
		while (1){
			if (s == 0){ break; }
			f = a%s;
			a = s;
			s = f;
		}

		printf("%d ", a);

		printf("%d\n", A*S / a);
	

	return 0;
}