#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  char s[105];
  int n, i;
  gets(s);
  n = strlen(s);
  for (i = n - 1; i >= 0; i--)
    if (isalpha(s[i])) break;
  if (s[i] == 'a' || s[i] == 'A' || s[i] == 'e' || s[i] == 'E' || s[i] == 'i' ||
      s[i] == 'I' || s[i] == 'o' || s[i] == 'O' || s[i] == 'u' || s[i] == 'U' ||
      s[i] == 'y' || s[i] == 'Y')
    cout << "YES";
  else
    cout << "NO";
}
