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