#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  string s, s1 = "AEIOUYaeiouy",
            s2 = "BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz";
  getline(cin, s);
  bool p = 0;
  for (int i = 0; i < s.size(); ++i) {
    if (s1.find(s[i]) != -1)
      p = 1;
    else if (s2.find(s[i]) != -1)
      p = 0;
  }
  if (p)
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
