#include <bits/stdc++.h>
using namespace std;
bool b[111111];
int a[111111];
int i, j, n, k;
bool ischar(char l) {
  return ((l >= 'a' && l <= 'z') || (l >= 'A' && l <= 'Z'));
}
bool vow(char k) {
  return (k == 'a' || k == 'e' || k == 'i' || k == 'o' || k == 'u' ||
          k == 'y' || k == 'A' || k == 'E' || k == 'I' || k == 'O' ||
          k == 'U' || k == 'Y');
}
int main() {
  string Q;
  char T;
  getline(cin, Q);
  while (i < Q.size()) {
    if (ischar(Q[i])) T = Q[i];
    i++;
  }
  if (vow(T))
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
