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