N=int(input()) Tmax=N-1 X=0 Y=0 Z=0 if N%2==0: X=1 N=N/2 if N%2==0: Y=1 N=N/2 Z=N-1 print(int(X+Y+Z),Tmax)