https://codeforces.com/problemset/problem/1703/A
#include <iostream>
#include <string>
#include <algorithm>
using namespace std;
int main() {
int count;
cin >> count;
cin.ignore();
for(int i = 0; i < count; i++){
string str;
cin >> str;
transform(str.begin(), str.end(), str.begin(), ::tolower);
if(str.compare("yes") == 0){
cout << "YES" << endl;
}
else {
cout << "NO" << endl;
}
}
return 0;
}