#include <bits/stdc++.h>
using namespace std;
int main() {
  string x;
  string y;
  getline(cin, x);
  for (int i = 0; i < x.length(); i++) {
    if (isalpha(x[i])) {
      x[i] = tolower(x[i]);
      y += x[i];
    }
  }
  int k = y.size();
  if (y[k - 1] == 'a' || y[k - 1] == 'u' || y[k - 1] == 'y' ||
      y[k - 1] == 'o' || y[k - 1] == 'i' || y[k - 1] == 'e')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
