#include <bits/stdc++.h>
using namespace std;
void fastcode() {
  std::ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
long long gcd(long long a, long long b) { return a ? gcd(b % a, a) : b; }
long long lcm(long long a, long long b) { return a / gcd(a, b) * b; }
int dx_r[] = {1, 0, -1, 0, -1, 1, -1, 1};
int dy_c[] = {0, 1, 0, -1, -1, 1, 1, -1};
int main() {
  fastcode();
  string s;
  getline(cin, s);
  char x;
  for (int i = s.size() - 1; i >= 0; i--) {
    s[i] = tolower(s[i]);
    if (s[i] >= 'a' && s[i] <= 'z') {
      x = char(s[i]);
      break;
    }
  }
  if (x == 'a' || x == 'e' || x == 'o' || x == 'i' || x == 'u' || x == 'y') {
    cout << "YES";
  } else {
    cout << "NO";
  }
  return 0;
}
