n = int(input())
def is_even(num):
return num%2==0
def is_2(num):
return num >= 4 and num < 13
print("{:.0f} {:.0f} {:.0f} {:.0f}".format(is_even(n) and is_2(n),is_even(n) or is_2(n),(is_even(n) and not is_2(n)) or (not is_even(n) and is_2(n)),not is_even(n) and not is_2(n)))