#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  string s;
  char c;
  getline(cin, s);
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] >= 'A' || s[i] <= 'Z') {
      s[i] = tolower(s[i]);
    }
  }
  for (long long i = 0; i < s.size(); i++) {
    if (s[i] >= 'a' && s[i] <= 'z') {
      c = s[i];
    }
  }
  if (c == 'a' || c == 'i' || c == 'o' || c == 'u' || c == 'e' || c == 'y') {
    cout << "YES"
         << "\n";
  } else {
    cout << "NO"
         << "\n";
  }
}
