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