#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, co(0);
  bool f = 0;
  string str, str1;
  getline(cin, str);
  n = str.size();
  for (int i = 0; i < n; i++) {
    str[i] = tolower(str[i]);
    if (isalpha(str[i])) {
      co = i;
    }
  }
  if ((str[co] == 'a') || (str[co] == 'e') || (str[co] == 'i') ||
      (str[co] == 'o') || (str[co] == 'u') || (str[co] == 'y')) {
    cout << "YES\n";
  } else {
    cout << "NO\n";
  }
  return 0;
}
