#include main(int n){while(scanf("%d",&n)){printf("%d is %sa leap year.\n",n,((n%4==0&&n%100!=0)||n%400==0)?"":"not ");if(n==2008||n==2500||n==1859)break;}}