# https://www.P5710



x = int(input())

# 条件1 的结果保存到 变量 A 中

A = (x % 2 == 0)

# 条件2 的结果保存到 变量 B 中

B = (x > 4 and x <= 12)


# 四个人喜欢的情况保存在 res 中

# 小 A 喜欢这两个性质同时成立的整数;

q = 0
if A == True and B == True:
    q = 1

# Uim 喜欢这【至少符合其中一种性质】的整数;

w = 0
# if (A == True and B == False) or (A == False and B == True) or (A == True and B == True):
if A == True or B == True:
    w = 1
    
# 八尾勇喜欢【刚好有符合】其中一个性质的整数;

e = 0
if (A == True and B == False) or (A == False and B == True):
    e = 1
    
# 正妹喜欢不符合这两个性质的整数。

r = 0
if A == False and B == False:
    r = 1

print(q, w, e, r)  # 默认多变量输出就是使用空格分隔