def GCD_cal(a,b):
	if(b==0):
		return(a)
	a,b=b,a%b
	return(GCD_cal(a,b))

while(True):
	try:
		a,b=map(int,input().split(" "))
	except:
		break
	if(a<b):
		a,b=b,a
	GCD=GCD_cal(a,b)
	LCM=int(a*b/GCD)
	print("{0} {1}".format(GCD,LCM)) def GCD_cal(a,b):
	if(b==0):
		return(a)
	a,b=b,a%b
	return(GCD_cal(a,b)) GCD_cal if(b==0):
		return(a)
	 b==0 b 0 return(a) a a,b=b,a%b a b b a%b a b return(GCD_cal(a,b)) GCD_cal(a,b) GCD_cal a b a a b b while(True):
	try:
		a,b=map(int,input().split(" "))
	except:
		break
	if(a<b):
		a,b=b,a
	GCD=GCD_cal(a,b)
	LCM=int(a*b/GCD)
	print("{0} {1}".format(GCD,LCM)) True try:
		a,b=map(int,input().split(" "))
	except:
		break
	 except:
		break
	 break a,b=map(int,input().split(" ")) a map(int,input().split(" ")) map int input().split(" ") ().split () input split " " b if(a<b):
		a,b=b,a
	 a<b a b a,b=b,a a b b a GCD=GCD_cal(a,b) GCD GCD_cal(a,b) GCD_cal a b LCM=int(a*b/GCD) LCM int(a*b/GCD) int a*b/GCD a*b a b GCD print("{0} {1}".format(GCD,LCM)) print "{0} {1}".format(GCD,LCM) "{0} {1}".format "{0} {1}" format GCD LCM def GCD_cal(a,b):
	if(b==0):
		return(a)
	a,b=b,a%b
	return(GCD_cal(a,b)) def GCD_cal(a,b):
	if(b==0):
		return(a)
	a,b=b,a%b
	return(GCD_cal(a,b)) GCD_cal GCD=GCD_cal(a,b) GCD_cal(a,b) GCD b=b,a a b LCM=int(a*b/GCD) int(a*b/GCD) LCM a,b=b,a b a b=map(int,input().split(" ")) map(int,input().split(" ")) b a,b=map(int,input().split(" ")) map(int,input().split(" ")) a
def GCD_cal(a,b):
	if(b==0):
		return(a)
	a,b=b,a%b
	return(GCD_cal(a,b))

while(True):
	try:
		a,b=map(int,input().split(" "))
	except:
		break
	if(a<b):
		a,b=b,a
	GCD=GCD_cal(a,b)
	LCM=int(a*b/GCD)
	print("{0} {1}".format(GCD,LCM))