#include <bits/stdc++.h>
using namespace std;
long long gcd(long long a, long long b) {
  if (b == 0) return a;
  return gcd(b, a - (a / b * b));
}
long long mypow(long long a, long long b) {
  long long p = 1;
  if (b == 0) return 1;
  for (long long i = 0; i < b; i++) p *= a;
  return p;
}
long long zero(long long a) {
  long long za = 0;
  long long temp = a;
  long long tens = 0;
  while (temp > 0) {
    if (temp % 10 != 0) {
      za += ((temp % 10) * (mypow(10, tens)));
      tens++;
    }
    temp /= 10;
  }
  return za;
}
int main() {
  string st;
  while (getline(cin, st)) {
    int i = st.length() - 2;
    while (st[i] == ' ') i--;
    if (st[i] < 97) st[i] += 32;
    if (st[i] == 'a' || st[i] == 'e' || st[i] == 'i' || st[i] == 'o' ||
        st[i] == 'u' || st[i] == 'y')
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
  return 0;
}
