#include <bits/stdc++.h>
using namespace std;
unsigned long long minimum(unsigned long long a, unsigned long long b) {
  return (a < b) ? a : b;
}
unsigned long long maximum(unsigned long long a, unsigned long long b) {
  return (a > b) ? a : b;
}
unsigned long long great(unsigned long long a, unsigned long long b) {
  if (b == 0) return a;
  return great(b, a % b);
}
vector<char> pb;
int main() {
  char s[101];
  gets(s);
  ;
  int len = strlen(s);
  for (int i = 0; i < len; i++) {
    if ((s[i] >= 'a' && s[i] <= 'z') || (s[i] >= 'A' && s[i] <= 'Z')) {
      pb.push_back(s[i]);
    }
  }
  reverse(pb.begin(), pb.end());
  if (pb[0] == 'a' || pb[0] == 'e' || pb[0] == 'i' || pb[0] == 'o' ||
      pb[0] == 'u' || pb[0] == 'y' || pb[0] == 'A' || pb[0] == 'E' ||
      pb[0] == 'I' || pb[0] == 'O' || pb[0] == 'U' || pb[0] == 'Y')
    puts("YES");
  else
    puts("NO");
  return 0;
}
