#include <bits/stdc++.h>
using namespace std;
template <class T>
T gcd(T a, T b) {
  return b <= 0 ? a : gcd(b, a % b);
}
template <class T>
T lcm(T a, T b) {
  return (a * b) / gcd(a, b);
}
template <class T>
T large(T a, T b) {
  return a > b ? a : b;
}
template <class T>
T small(T a, T b) {
  return a < b ? a : b;
}
template <class T>
T dif(T a, T b) {
  return a - b < 0 ? b - a : a - b;
}
template <class T>
string toStr(const T &x) {
  stringstream s;
  s << x;
  return s.str();
}
template <class T>
int toInt(const T &x) {
  stringstream s;
  s << x;
  int r;
  s >> r;
  return r;
}
void in() {}
int main() {
  in();
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string s;
  char c;
  int i;
  getline(cin, s);
  for (i = ((int)(s).size()) - 1; i >= 0; i--) {
    if (isalpha(s[i])) {
      c = tolower(s[i]);
      break;
    }
  }
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u' || c == 'y')
    cout << "YES" << endl;
  else
    cout << "NO" << endl;
  return 0;
}
