#include <bits/stdc++.h>
using namespace std;
int main() {
  int l, i;
  string s;
  char a;
  getline(cin, s);
  l = s.length();
  for (i = l - 1; i >= 0; i--) {
    if ((s[i] >= 65 && s[i] <= 90) || (s[i] >= 97 && s[i] <= 122)) {
      a = s[i];
      break;
    }
  }
  if ((a == 'a') || (a == 'e') || (a == 'i') || (a == 'o') || (a == 'u') ||
      (a == 'y') || (a == 'Y') || (a == 'A') || (a == 'E') || (a == 'I') ||
      (a == 'O') || (a == 'U')) {
    cout << "YES";
  } else
    cout << "NO";
  return 0;
}
