#include <bits/stdc++.h>
using namespace std;
string s;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  getline(cin, s);
  for (int i = s.size() - 1; i >= 0; i--)
    if ((s[i] >= 'A' && s[i] <= 'Z') || (s[i] >= 'a' && s[i] <= 'z')) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u' || s[i] == 'y' || s[i] == 'A' || s[i] == 'E' ||
          s[i] == 'I' || s[i] == 'O' || s[i] == 'U' || s[i] == 'Y')
        cout << "YES";
      else
        cout << "NO";
      i = 0;
    }
}
