#include <bits/stdc++.h>
int main() {
  char arr[105];
  fgets(arr, 105, stdin);
  for (int i = strlen(arr) - 1; i >= 0; i--) {
    if (arr[i] == 'A' or arr[i] == 'a' or arr[i] == 'E' or arr[i] == 'e' or
        arr[i] == 'I' or arr[i] == 'i' or arr[i] == 'O' or arr[i] == 'o' or
        arr[i] == 'U' or arr[i] == 'u' or arr[i] == 'Y' or arr[i] == 'y') {
      printf("YES");
      break;
    } else if (arr[i] == 'B' or arr[i] == 'b' or arr[i] == 'C' or
               arr[i] == 'c' or arr[i] == 'D' or arr[i] == 'd' or
               arr[i] == 'F' or arr[i] == 'f' or arr[i] == 'G' or
               arr[i] == 'g' or arr[i] == 'H' or arr[i] == 'h' or
               arr[i] == 'J' or arr[i] == 'j' or arr[i] == 'K' or
               arr[i] == 'k' or arr[i] == 'L' or arr[i] == 'l' or
               arr[i] == 'M' or arr[i] == 'm' or arr[i] == 'N' or
               arr[i] == 'n' or arr[i] == 'P' or arr[i] == 'p' or
               arr[i] == 'Q' or arr[i] == 'q' or arr[i] == 'R' or
               arr[i] == 'r' or arr[i] == 'S' or arr[i] == 's' or
               arr[i] == 'T' or arr[i] == 't' or arr[i] == 'V' or
               arr[i] == 'v' or arr[i] == 'X' or arr[i] == 'x' or
               arr[i] == 'Z' or arr[i] == 'z') {
      printf("NO");
      break;
    }
  }
  return 0;
}
