#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  int end = str.length();
  while (not((str[end] >= 'a' and str[end] <= 'z') or
             (str[end] >= 'A' && str[end] <= 'Z')))
    end--;
  if (str[end] == 'A' || str[end] == 'E' || str[end] == 'I' ||
      str[end] == 'O' || str[end] == 'U' || str[end] == 'Y' ||
      str[end] == 'a' || str[end] == 'e' || str[end] == 'i' ||
      str[end] == 'o' || str[end] == 'u' || str[end] == 'y') {
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
