#include <bits/stdc++.h>
using namespace std;
char a, b;
string s = "aiuoyeAIUOYE";
int main() {
  ios::sync_with_stdio(false);
  while (cin >> a)
    if (a >= 'A' && a <= 'z') b = a;
  for (int i = 0; s[i]; i++)
    if (s[i] == b) return cout << "YES", 0;
  cout << "NO";
  return 0;
}
