#include<iostream>
using namespace std;
int main() {
int x,a=0,uim=0,yong=0,mei=0;
cin >> x;
if (x % 2 == 0 || 4 < x < 12) {
uim = 1;
}
if (x % 2 != 0 && 4 >= x && x >= 12) {
mei = 1;
}
if (x % 2 == 0 && 4 < x < 12) {
a = 1;
}
if(x%2==0&&x<=4&&x>=12){
yong=1;
}
if(x%2!=0&&4<x<12){
yong=1;
}
cout << a << " " << uim << " " << yong << " " << mei;
}