#include <bits/stdc++.h>
using namespace std;
enum { NOT_LETTER, CONSONANT, VOWEL };
string consonant_set = "BCDFGHJKLMNPQRSTVWXZbcdfghjklmnpqrstvwxz";
int letter(char c) {
  if ((c < 'A' || c > 'z') && !(c > 'Z' && c < 'a')) {
    return NOT_LETTER;
  } else if (consonant_set.find(c) != string::npos) {
    return CONSONANT;
  } else {
    return VOWEL;
  }
}
int main(int argc, char** argv) {
  string s;
  bool ok = false;
  char s_t[100];
  cin.getline(s_t, 100);
  s = s_t;
  for (size_t i = s.length() - 1; !ok && i != -1; --i) {
    switch (letter(s[i])) {
      case NOT_LETTER:
        break;
      case CONSONANT:
        cout << "NO";
        ok = true;
        break;
      case VOWEL:
        cout << "YES";
        ok = true;
        break;
    }
  }
  return 0;
}
