a=1 N = int(input()) A = 2 B = N-2 print(A,B)