#include <bits/stdc++.h>
using namespace std;
int main() {
  char c, d;
  while (cin >> c) {
    if (c == '?') break;
    if (c >= 'a' && c <= 'z') {
      c -= 'a';
      c += 'A';
    }
    d = c;
  }
  c = d;
  if (c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
