#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string str;
  int in;
  getline(cin, str);
  for (int i = 0; i < str.size(); i++) {
    str[i] = tolower(str[i]);
    if (isalpha(str[i])) in = i;
  }
  char c = str[in];
  if (c == 'a' || c == 'e' || c == 'o' || c == 'u' || c == 'i' || c == 'y')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
