#include <iostream>
#include <iomanip>
using namespace std;
void re();
void function_luogu_P5710()
{
int A = 0, Umi = 0, Hachi = 0, Zheng = 0;
int input;
bool even = false, b4s12 = false;
cin >> input;
if (input / 2) { even = true; }
if (input > 4 && input <= 12) { b4s12 = true; }
if (even && b4s12) { A = 1; }
if (even || b4s12) { Umi = 1; }
if (!even && !b4s12) { Zheng = 1; }
if ((!even && b4s12) || (even && !b4s12)) { Hachi = 1; }
cout << A << " " << Umi << " " << Hachi << " " << Zheng << endl;
}
int main()
{
function_luogu_P5710();
re();
return 0;
}
void re()
{
cout << endl << "Enter 1 to redo, or enter enyelse to exit.";
int input;
cin >> input;
if (input == 1)
{
cout << endl << "redo:" << endl;
main();
}
input = 0;
}