#include using namespace std; int main(){ int t; cin >> t; while(t--){ int x; cin >> x; if(x == 0 || x == 45) cout << "Y" << endl; else cout << "N" << endl; } return 0; }