#include <bits/stdc++.h>
using namespace std;
char arr[105], lc;
int main() {
  fgets(arr, sizeof arr, stdin);
  int s = strlen(arr);
  for (int i = 0; i < s; i++) {
    if (isalpha(arr[i])) {
      lc = arr[i];
    }
  }
  if (toupper(lc) == 'A' || toupper(lc) == 'E' || toupper(lc) == 'I' ||
      toupper(lc) == 'O' || toupper(lc) == 'U' || toupper(lc) == 'Y') {
    printf("YES");
    return 0;
  }
  printf("NO");
  return 0;
}
