#include <bits/stdc++.h>
using namespace std;
int vis[100011];
int memo[10001];
int dx[] = {-1, 0};
int dy[] = {0, 1};
int main() {
  string v = "aeiouy";
  string s, res = "NO";
  getline(cin, s);
  char c;
  for (int i = (0); i < ((int)s.size()); i++) {
    if (isalpha(s[i])) c = tolower(s[i]);
  }
  for (int i = (0); i < ((int)v.size()); i++) {
    if (v[i] == c) {
      cout << "YES\n";
      return 0;
    }
  }
  cout << "NO\n";
  return 0;
}
