#include <bits/stdc++.h>
using namespace std;
int main() {
  string line;
  bool ok = false;
  getline(cin, line);
  transform(line.begin(), line.end(), line.begin(), ::tolower);
  for (int i = line.size() - 1; i > -1; --i) {
    char s = line[i];
    if (isalpha(s)) {
      if (s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u' ||
          s == 'y') {
        ok = true;
      }
      break;
    }
  }
  printf("%s\n", ok ? "YES" : "NO");
  return 0;
}
