a = 0 u = 0 y = 0 m = 0 num = int(input()) c1 = num % 2 == 0 c2 = 4 < num < 12 if c1 and c2: a = 1 if c1 or c2: u = 1 if not(c1) and c2 or not(c2) and c1: y = 1 if not(c1) and not(c2): m = 1 print(a,u,y,m)