#include <bits/stdc++.h>
using namespace std;
set<char> S = {'a', 'e', 'i', 'o', 'u', 'y', 'A', 'E', 'I', 'O', 'U', 'Y'};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  getline(cin, s);
  bool a = false;
  for (auto c : s)
    if ((c >= 'a' and c <= 'z') or (c >= 'A' and c <= 'Z'))
      a = (S.find(c) != S.end());
  cout << (a ? "YES" : "NO") << endl;
  return 0;
}
