#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, ans, vowels = "aeiouy";
  getline(cin, s);
  for (char c : s)
    if (vowels.find(tolower(c)) != string::npos)
      ans = "YES";
    else if ('a' <= tolower(c) && tolower(c) <= 'z')
      ans = "NO";
  cout << ans << '\n';
  return 0;
}
