#include <bits/stdc++.h>
using namespace std;
const long long INF = 1e18;
const int32_t M = 1e4 + 7;
const int32_t MM = 998244353;
char ch, t;
void solve() {
  while (cin >> ch) {
    if (ch >= 'a' and ch <= 'z')
      t = ch;
    else if (ch >= 'A' and ch <= 'Z')
      t = ch + 32;
  }
  if (t == 'a' or t == 'e' or t == 'i' or t == 'o' or t == 'u' or t == 'y')
    cout << "YES";
  else
    cout << "NO";
}
signed main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  long long t = 1;
  while (t--) solve();
  return 0;
}
