#include <bits/stdc++.h>
int main(void) {
  char vowels[20] = "AEIOUYaeiouy";
  char last = 0, c;
  while (scanf("%c", &c) != EOF) {
    if (c >= 'a' && c <= 'z' || c >= 'A' && c <= 'Z') last = c;
  }
  for (int i = 0; vowels[i]; i++)
    if (vowels[i] == last) {
      puts("YES");
      return 0;
    }
  puts("NO");
  return 0;
}
