#include<iostream>;usingnamespace std;
intmain(){
int x,a,b,c,e,d;
cin >> x;
a = x % 2 ==0&& (x > 4 && x <= 12);//all can
b = x % 2 ==0|| (x > 4 && x <= 12);//least one can
c = !a;//least one can't
e = !b;//all can't
d = b==1&&c==1;
cout << a<<" " << b<<" " << e <<" " << d;
}