#include<bits/stdc++.h>
using namespace std;
int main() {
int a,b,c;
cin>>a>>b>>c;
if(a>=16&&a<=19&&b>=50&&b<=80&&c>=165&&c<=185) cout<<"Y";
else cout<<"N";
}
/**************************************************************
Problem: 1661
User: linzihang
Language: C++
Result: Accepted
Time:20 ms
Memory:2072 kb
****************************************************************/