#include <bits/stdc++.h>
using namespace std;
int main() {
  string p;
  getline(cin, p);
  bool f = 0;
  for (int i = 0; i < p.size(); i++) {
    if (p[i] >= 'a' && p[i] <= 'z') {
      if (p[i] == 'a' || p[i] == 'i' || p[i] == 'u' || p[i] == 'e' ||
          p[i] == 'o' || p[i] == 'y')
        f = 1;
      else
        f = 0;
    }
    if (p[i] >= 'A' && p[i] <= 'Z') {
      if (p[i] == 'A' || p[i] == 'I' || p[i] == 'U' || p[i] == 'E' ||
          p[i] == 'O' || p[i] == 'Y')
        f = 1;
      else
        f = 0;
    }
  }
  if (f)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
