#include <bits/stdc++.h>
using namespace std;
using namespace std;
const int INF = 2147483647;
const long long LLINF = 9223372036854775807LL;
int main() {
  int len;
  char s[150];
  cin.getline(s, sizeof(s));
  len = strlen(s) - 2;
  while ((s[len] - ' ' == 0)) len = len - 1;
  if (toupper(s[len]) == 'A' || toupper(s[len]) == 'E' ||
      toupper(s[len]) == 'I' || toupper(s[len]) == 'O' ||
      toupper(s[len]) == 'U' || toupper(s[len]) == 'Y')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
