#include <bits/stdc++.h>
using namespace std;
int main() {
  string str;
  getline(cin, str);
  char c = 0;
  int n = str.length();
  for (int i = n - 1; i >= 0; i--) {
    if ((str[i] >= 65 && str[i] <= 90) || (str[i] >= 97 && str[i] <= 122)) {
      c = str[i];
      break;
    }
  }
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y' ||
      c == 'A' || c == 'E' || c == 'I' || c == 'O' || c == 'U' || c == 'Y')
    cout << "YES";
  else
    cout << "NO";
  return 0;
}
