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