c++ 9.0
using namespace std;
int main()
{
int a;
cin>>a;
if(a%400==0)
{
cout <<a/10 <<" ";
cout <<a/10%10 <<" ";
cout <<a/10%100 <<" ";
cout <<a%1000;
}
else if(a%4==0 && a%100!=0)
{
cout <<a/10 <<" ";
cout <<a/10%10 <<" ";
cout <<a/10%100 <<" ";
cout <<a%1000;
}
else
{
cout <<a%1000 <<" "
cout <<a/10%100 <<" ";
cout <<a/10%10 <<" ";
cout <<a/10;
}
return 0;
}