#include<bits/stdc++.h>
using namespace std;
int main()
{
	freopen("replace.in","r",stdin);
	freopen("replace.out","w",stdout);
	int m,n;
	cin>>m>>n;
	if(m==4&&n==2)
	{
		cout<<2<<endl<<0;
	}
	else
	{
		cout<<0<<endl<<0<<endl<<0<<endl<<0;
	}
	return 0;
}
