#include <bits/stdc++.h>
using namespace std;
int main() {
  map<char, bool> make_pair;
  bool vowel;
  make_pair['a'] = make_pair['e'] = make_pair['i'] = make_pair['o'] =
      make_pair['u'] = make_pair['y'] = 1;
  string x;
  getline(cin, x);
  stringstream ss(x);
  while (ss >> x) {
    for (register int i = (0); i < (int)(x.size()); i++) {
      if (x[i] != '?') vowel = make_pair[tolower(x[i])];
    }
  }
  if (vowel)
    printf("YES\n");
  else
    printf("NO\n");
  return 0;
}
