#include <bits/stdc++.h>
using namespace std;
void fastio() {
  ios_base::sync_with_stdio(false), cin.tie(nullptr), cout.tie(nullptr);
}
pair<int, int> fun(vector<int> &a) {
  int n = a.size();
  int mn = INT_MAX;
  pair<int, int> p;
  for (int i = 0; i < n; i++) {
    int j = (i + 1) % n;
    if (abs(a[i] - a[j]) <= mn) {
      p = {i + 1, j + 1};
      mn = abs(a[i] - a[j]);
    }
  }
  return p;
}
int main() {
  fastio();
  int t = 1;
  while (t--) {
    string s;
    getline(cin, s);
    char c;
    for (char ch : s) {
      if (isalpha(ch)) c = ch;
    }
    unordered_set<char> st = {'a', 'e', 'i', 'o', 'u', 'y',
                              'Y', 'A', 'E', 'I', 'O', 'U'};
    if (st.find(c) == st.end())
      cout << "NO";
    else
      cout << "YES";
  }
  return 0;
}
