#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  for (int i = s.size() - 1; i >= 0; --i) {
    if (s[i] != '?' && s[i] != ' ') {
      if (s[i] == 'a' || s[i] == 'A' || s[i] == 'e' || s[i] == 'E' ||
          s[i] == 'o' || s[i] == 'O' || s[i] == 'u' || s[i] == 'U' ||
          s[i] == 'i' || s[i] == 'I' || s[i] == 'y' || s[i] == 'Y') {
        cout << "YES" << endl;
      } else
        cout << "NO";
      i = -1;
    }
  }
  return 0;
}
