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