#include<bits/stdc++.h> using namespace std; int a; int main(){ cin>>a,puts(a%4==0&&(a%100!=0||a%400==0)?"Y":"N"); return 0; }