#include <bits/stdc++.h>
using namespace std;
char yuan[12] = {'a', 'e', 'i', 'o', 'u', 'A', 'E', 'I', 'O', 'U', 'y', 'Y'};
int main() {
  string s;
  getline(cin, s);
  int len = s.size() - 1;
  while (!isalpha(s[len])) len--;
  for (int i = 0; i < 12; i++) {
    if (s[len] == yuan[i]) {
      cout << "YES";
      return 0;
    }
  }
  cout << "NO";
  return 0;
}
