#include <bits/stdc++.h>
using namespace std;
int main() {
  char last;
  cin >> last;
  while (1) {
    char temp;
    cin >> temp;
    if (temp == '?') break;
    last = temp;
  }
  last = tolower(last);
  if (last == 'a' || last == 'e' || last == 'i' || last == 'o' || last == 'u' ||
      last == 'y')
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
