#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  char L, M;
  int f = 1;
  while (1) {
    cin >> L;
    if (L == '?') break;
    M = L;
  }
  string S = "AEIOUYaeiouy";
  for (int i = 0; i < S.size(); i++)
    if (M == S[i]) {
      cout << "YES" << '\n';
      f = 0;
      break;
    }
  if (f) cout << "NO" << '\n';
  return 0;
}
