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