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