#include <bits/stdc++.h>
using namespace std;
int main() {
  long long int b, c = 1000000, sum = 0, i = 0, j, n, d = 0, q = 0, e, t = 0, x,
                   p, h, l = 0, k = 0, x1, x2, y1, y2, m;
  string s;
  getline(cin, s);
  char f;
  for (i = 0; i < s.length(); i++) {
    if ((s[i] <= 90 && s[i] >= 65) || (s[i] <= 122 && s[i] >= 97)) f = s[i];
  }
  if (f == 'a' || f == 'e' || f == 'i' || f == 'o' || f == 'u' || f == 'A' ||
      f == 'E' || f == 'I' || f == 'O' || f == 'U' || f == 'y' || f == 'Y') {
    cout << "YES";
  } else
    cout << "NO";
}
