#include <bits/stdc++.h>
using namespace std;
const int inf = INT_MAX;
const double PI = 3.14159265;
int dpx[4] = {0, 1, 0, -1};
int dpy[4] = {1, 0, -1, 0};
int main() {
  string str;
  getline(cin, str);
  int pos = str.size() - 2;
  while (str[pos] == ' ') {
    pos--;
  }
  char ch = str[pos];
  if (ch > 95) {
    ch = ch + 'A' - 'a';
  }
  if (ch == 'A' || ch == 'E' || ch == 'Y' || ch == 'U' || ch == 'I' ||
      ch == 'O') {
    cout << "YES";
  } else {
    cout << "NO";
  }
}
