#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  s.erase(s.length() - 1);
  int i = s.length() - 1;
  while (1) {
    if (s[i] > 32) break;
    i--;
  }
  char a = s[i];
  a = tolower(a);
  if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u' || a == 'y')
    cout << "YES";
  else
    cout << "NO";
}
