#include <bits/stdc++.h>
using namespace std;
const long long int mod = 1e9 + 7;
const long double eps = 1e-9;
const long long int maxn = 1e5 + 1;
const long long int inf = 1e18;
const long long int minf = -inf;
mt19937 rng(chrono::steady_clock::now().time_since_epoch().count());
bool solve() {
  string str;
  getline(cin, str);
  for (long long int i = str.length() - 1; i >= 0; i--) {
    int n = int(str[i]);
    if (n >= 65 && n <= 90 || n >= 97 && n <= 122) {
      if (n == int('A') || n == int('a') || n == int('E') || n == int('e') ||
          n == int('I') || n == int('i') || n == int('O') || n == int('o') ||
          n == int('U') || n == int('u') || n == int('Y') || n == int('y'))
        cout << "YES";
      else
        cout << "NO";
      return true;
    } else
      continue;
  }
  return true;
}
int main() {
  ios_base ::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long int t = 1;
  while (t--) {
    if (solve()) {
    } else {
    }
  }
  cerr << "Time Elapsed: " << 1000 * ((double)clock()) / (double)CLOCKS_PER_SEC
       << "ms\n";
  return 0;
}
