#include <bits/stdc++.h>
using namespace std;
bool isVowel(char ch) {
  ch = tolower(ch);
  if (ch == 'a') return true;
  if (ch == 'e') return true;
  if (ch == 'i') return true;
  if (ch == 'o') return true;
  if (ch == 'u') return true;
  if (ch == 'y') return true;
  return false;
}
int main() {
  int i;
  char s[100];
  gets(s);
  for (i = strlen(s) - 1; i > -1; i--) {
    if (isalpha(s[i])) {
      if (isVowel(s[i]))
        cout << "YES";
      else
        cout << "NO";
      break;
    }
  }
  return 0;
}
