#include <bits/stdc++.h>
using namespace std;
int main() {
  string line;
  getline(cin, line);
  char last;
  for (int i = 0; i < line.length(); i++) {
    if (line[i] != ' ' && line[i] != '?') last = line[i];
  }
  last = char(tolower(last));
  if (last == 'a' || last == 'e' || last == 'o' || last == 'i' || last == 'y' ||
      last == 'u')
    cout << "YES";
  else
    cout << "NO";
  cout << endl;
  return 0;
}
