#include <bits/stdc++.h>
using namespace std;
int main() {
  string seq;
  getline(cin, seq);
  int length = seq.length();
  bool flag = false;
  for (int i = length - 1; i >= 0; i--) {
    if ((seq[i] >= 'A' && seq[i] <= 'Z') || (seq[i] >= 'a' && seq[i] <= 'z')) {
      if (seq[i] == 'a' || seq[i] == 'A') flag = true;
      if (seq[i] == 'e' || seq[i] == 'E') flag = true;
      if (seq[i] == 'i' || seq[i] == 'I') flag = true;
      if (seq[i] == 'o' || seq[i] == 'O') flag = true;
      if (seq[i] == 'u' || seq[i] == 'U') flag = true;
      if (seq[i] == 'y' || seq[i] == 'Y') flag = true;
      break;
    }
  }
  if (!flag)
    printf("NO");
  else
    printf("YES");
  return 0;
}
