mod=1000000007 A=492 B=493 print(A,B) K=int(input()) if K%B==0: print(0) else: print(1)