x=int(input()) a ,b=0, 0 #四个状态可以用2个二进制位表示 if not(x&1): #判断奇偶 a=1 if 4<x and x<=12: #判断大小 b=1 print(a&b, a|b, a^b, int(not a and not b))