#include <bits/stdc++.h>
using namespace std;
int main() {
  string thing;
  getline(cin, thing);
  int iter = thing.length() - 1;
  while (thing[iter] == '?' || thing[iter] == ' ') {
    iter--;
  }
  char inv = thing[iter];
  if (inv == 'a' || inv == 'A' || inv == 'i' || inv == 'I' || inv == 'u' ||
      inv == 'U' || inv == 'e' || inv == 'E' || inv == 'o' || inv == 'O' ||
      inv == 'y' || inv == 'Y') {
    cout << "YES" << endl;
  } else {
    cout << "NO" << endl;
  }
  return 0;
}
