#include <bits/stdc++.h>
using namespace std;
const long long INF = 1000000000 + 7;
const double esp = 1e-13;
const double pi = 3.141592653589;
long long canhai(long long n) {
  long long fi, la, mid;
  fi = 0;
  la = n + 1;
  while (fi + 1 < la) {
    mid = fi / 2 + la / 2;
    if (fi % 2 && la % 2) mid++;
    if (mid > n / mid)
      la = mid;
    else
      fi = mid;
  }
  return fi;
}
long long power(long long a, long long n, long long m) {
  if (n == 0) return 1;
  long long tmp, c;
  tmp = c = a;
  n--;
  while (n) {
    if (n % 2) tmp = tmp * c % m;
    c = c * c % m;
    n /= 2;
  }
  return tmp;
}
char s[100];
char vt;
int main() {
  gets(s);
  for (long long i = 0; i < strlen(s); i++)
    if (('a' <= s[i] && s[i] <= 'z') || ('A' <= s[i] && s[i] <= 'Z')) vt = s[i];
  if (vt == 'u' || vt == 'e' || vt == 'o' || vt == 'a' || vt == 'i' ||
      vt == 'y' || vt == 'U' || vt == 'E' || vt == 'O' || vt == 'A' ||
      vt == 'I' || vt == 'Y')
    cout << "YES";
  else
    cout << "NO";
}
