#include <bits/stdc++.h>
using namespace std;
void solve() {
  string s1;
  getline(cin, s1);
  int l = s1.size();
  while (!isalpha(s1[l])) l--;
  char c = s1[l];
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y' ||
      c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y')
    cout << "YES";
  else
    cout << "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  solve();
  return 0;
}
