s=int(input())
a=0
u=0
b=0
z=0
if s%2==0 and 4<s<=12:
a=1
else :
a=0
if s%2==0 or 4<s<=12:
u=1
else :
u=0
if (s % 2 == 0 and not (4 < s <= 12)) or (not( s % 2 == 0) and 4 < s <= 12):
b=1
else :
b=0
if not(s % 2 == 0 and 4 < s <= 12):
z=1
else :
z=0
print(f"{a} {u} {b} {z}")