#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int l = s.length() - 1;
  l--;
  while (!isalpha(s[l])) {
    l--;
  }
  if ((tolower(s[l]) == 'a') || (tolower(s[l]) == 'e') ||
      (tolower(s[l]) == 'i') || (tolower(s[l]) == 'o') ||
      (tolower(s[l]) == 'u') || (tolower(s[l]) == 'y'))
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
