#include <bits/stdc++.h>
using namespace std;
int isvovel(char ch) {
  ch = tolower(ch);
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u' ||
      ch == 'y')
    return 1;
  return 0;
}
int main(void) {
  char str[105];
  gets(str);
  for (int i = strlen(str) - 1; i >= 0; i--) {
    if ((str[i] >= 65 && str[i] <= 90) || (str[i] >= 97 && str[i] <= 122)) {
      if (isvovel(str[i])) {
        cout << "YES\n";
        return 0;
      } else {
        cout << "NO\n";
        return 0;
      }
    }
  }
  cout << "NO\n";
  return 0;
}
