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