#include <bits/stdc++.h>
using namespace std;
string st;
int i, s;
int main() {
  getline(cin, st);
  for (i = 0; i <= st.length(); i++)
    if (isalpha(st[i])) {
      s = 0;
      if (st[i] == 'a' || st[i] == 'e' || st[i] == 'i' || st[i] == 'o' ||
          st[i] == 'u' || st[i] == 'A' || st[i] == 'E' || st[i] == 'I' ||
          st[i] == 'O' || st[i] == 'U' || st[i] == 'y' || st[i] == 'Y')
        s = 1;
    }
  s ? printf("YES") : printf("NO");
  return 0;
}
