#include <bits/stdc++.h>
using namespace std;
int main() {
  string S;
  char c = ' ';
  getline(cin, S);
  for (int i = 0; i < S.length(); i++) {
    S[i] = tolower(S[i]);
    if (S[i] >= 'a' && S[i] <= 'z') c = S[i];
    if (S[i] == '?') {
      int isLowercaseVowel = (c == 'a' || c == 'e' || c == 'i' || c == 'o' ||
                              c == 'u' || c == 'y');
      if (isLowercaseVowel)
        cout << "YES";
      else
        cout << "NO";
    }
  }
}
