#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(NULL);
  ;
  char k, last;
  int i, x, n;
  k = 'a';
  while (k != '?') {
    if (k != ' ') {
      last = k;
    }
    cin >> k;
  }
  if (last == 'a' || last == 'A' || last == 'e' || last == 'E' || last == 'i' ||
      last == 'I' || last == 'o' || last == 'O' || last == 'U' || last == 'u' ||
      last == 'y' || last == 'Y') {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
