#include<iostream>
using namespace std;
bool isLeapYear(int);
int main()//主函数，判断闰年
{
	cout<<"Please input a year:"<<endl;//输出提示语
	int year=1; //声明变量并赋初值
	while(year>0)//当条件year>0时，连续输入
	{
		cin>>year;
		if(isLeapYear(year))
		{
			cout<<year<<" is a leap year"<<endl;
			cout<<endl;//输出换行，增大间距
		}
		else
		{
			cout<<year<<" is not a leap year"<<endl;
			cout<<endl;//输出换行，增大间距
		}
	}
	return 0;
}
bool isLeapYear(int year)
{
	if(year%400==0||(year%4==0&&year%100!=0))
	{
		return true;
	}
	else
		return false;
}