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