
2) 
#include<iostream>
#include<string>
using namespace std;
 
int main()
{
	int T;
	cin >> T;
	while(T--)
	{
		string s;
		cin >> s;
		if(s.size() > 3) cout << "NO" << endl;
		else
		{
			int cnt = 0;
			if(s[0] == 'Y' || s[0] == 'y') cnt++;
			if(s[1] == 'E' || s[1] == 'e') cnt++;
			if(s[2] == 'S' || s[2] == 's') cnt++;
			
			if(cnt == 3) cout << "YES" << endl;
			else cout << "NO" << endl;
		}
		
			
	} 
	
	return 0;
 } 

