#include <bits/stdc++.h>
using namespace std;
int main() {
  string res[] = {"NO", "YES"};
  char x, c;
  bool code;
  while ((c = getchar()) != '?') {
    if (c != ' ') x = c;
    if (x == 'A' || x == 'E' || x == 'I' || x == 'O' || x == 'U' || x == 'Y' ||
        x == 'a' || x == 'e' || x == 'i' || x == 'o' || x == 'u' || x == 'u')
      code = 1;
    else
      code = 0;
  }
  cout << res[code] << endl;
  return 0;
}
