while True:
	
	a=int(input());print(a&-~a<1 and a>1 and all(a%b for b in range(2,a)))
	print(a,end="\n\n")