https://www.luogu.com.cn/problem/P5710
"""
P5710 【深基3.例2】数的性质
https://www.luogu.com.cn/problem/P5710
"""
a=0
b=0
c=0
d=0
k=0
n=int(input())
if n%2==0:
k+=1
if n>4 and n<=12:
k+=1
if k==2:
a=1
if k>0:
b=1
if k==1:
c=1
if k==0:
d=1
print(a,end=' ')
print(b,end=' ')
print(c,end=' ')
print(d)