#include <bits/stdc++.h>
using namespace std;
string fun(char c) {
  unordered_map<char, long> a;
  a['a'] = 1;
  a['e'] = 1;
  a['i'] = 1;
  a['o'] = 1;
  a['u'] = 1;
  a['A'] = 1;
  a['E'] = 1;
  a['I'] = 1;
  a['O'] = 1;
  a['U'] = 1;
  a['y'] = 1;
  a['Y'] = 1;
  for (auto x : a) {
    if (x.first == c) return "YES";
  }
  return "NO";
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  string s;
  getline(cin, s);
  char c;
  for (long j = 0; j < s.length(); j++) {
    if ((s[j] >= 'a' && s[j] <= 'z') || (s[j] >= 'A' && s[j] <= 'Z')) c = s[j];
  }
  cout << fun(c);
  return 0;
}
