#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  while (getline(cin, s)) {
    int sz = s.size();
    char last;
    for (int i = 0; i < sz; i++) {
      char ch = s[i];
      ch = tolower(ch);
      if (ch >= 'a' && ch <= 'z') {
        last = ch;
      }
    }
    if (last == 'a' || last == 'e' || last == 'i' || last == 'o' ||
        last == 'u' || last == 'y')
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
