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