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