#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  getline(cin, s);
  for (int i = s.size() - 1; i >= 0; i--) {
    s[i] = tolower(s[i]);
    if (s[i] >= 97 and s[i] <= 122 and s[i] == 'a' or s[i] == 'e' or
        s[i] == 'u' or s[i] == 'i' or s[i] == 'o' or s[i] == 'y') {
      cout << "YES";
      return 0;
    } else if (s[i] >= 97 and s[i] <= 122) {
      cout << "NO";
      return 0;
    }
  }
}
