#include <bits/stdc++.h>
using namespace std;
int main() {
  int a;
  string s;
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) {
    if (s[i] >= 'A' and s[i] <= 'z') a = i;
  }
  if (s[a] == 'a' or s[a] == 'e' or s[a] == 'o' or s[a] == 'u' or s[a] == 'i' or
      s[a] == 'y' or s[a] == 'A' or s[a] == 'E' or s[a] == 'O' or s[a] == 'U' or
      s[a] == 'I' or s[a] == 'Y')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
