#include<iostream> #include<bits/stdc++.h> using namespace std; int main(){ double a; cin>>a; if(a%4>0) cout<<"N"; if(a%100==0&&a%400>0) cout<<"N"; else cout<<"Y"; }