#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  int i = 0;
  while (s[s.length() - 1 - i] < 65 || s[s.length() - 1 - i] > 122 ||
         s[s.length() - 1 - i] < 65 || s[s.length() - 1 - i] % 32 == 0 ||
         s[s.length() - 1 - i] % 32 > 26)
    i++;
  if (s[s.length() - 1 - i] % 32 == 1 || s[s.length() - 1 - i] % 32 == 5 ||
      s[s.length() - 1 - i] % 32 == 9 || s[s.length() - 1 - i] % 32 == 15 ||
      s[s.length() - 1 - i] % 32 == 21 || s[s.length() - 1 - i] % 32 == 25)
    cout << "YES";
  else
    cout << "NO";
}
