#include <bits/stdc++.h>
using namespace std;
const int mn = 1e5;
const int inf = 1e9;
const int mod = 1e9 + 7;
bool ch[mn];
int main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  cout << setprecision(30);
  string s;
  getline(cin, s);
  ch['A'] = ch['E'] = ch['I'] = ch['O'] = ch['U'] = ch['Y'] = ch['a'] =
      ch['e'] = ch['o'] = ch['i'] = ch['u'] = ch['y'] = 1;
  string ans;
  for (char i : s) {
    if (('a' <= i && i <= 'z') || ('A' <= i && i <= 'Z')) {
      if (ch[i]) {
        ans = "YES";
      } else {
        ans = "NO";
      }
    }
  }
  cout << ans << "\n";
  return 0;
}
