n=int(input())
a,b,c,d=0,0,0,0
if (n%2==0):
A=1
if (n>4)and(n<=12):
B=1
if (A==0)and(B==0):
d=1
elif (A==1)and(B==1):
a=1 b=1
elif ((A==1)and(B==0))or(A==0 and B==1):
c=1 b=1
print("%d %d %d %d"%(a,b,c,d))