#include <bits/stdc++.h>
using namespace std;
int main() {
  string Glasnie = "AEIOUYaeiouy";
  int n = Glasnie.size();
  string In;
  char t;
  do {
    cin >> t;
    In.push_back(t);
  } while (t != '?');
  int m = In.size();
  for (int i = 0; i < n; i++) {
    if (In[m - 2] == Glasnie[i]) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
