#include <bits/stdc++.h>
using namespace std;
int main() {
  string s;
  getline(cin, s);
  while (s[s.length() - 1] == ' ' || s[s.length() - 1] == '?')
    s.erase(s.length() - 1, 1);
  switch (s[s.length() - 1]) {
    case 'a':
    case 'A':
    case 'o':
    case 'O':
    case 'e':
    case 'E':
    case 'u':
    case 'U':
    case 'y':
    case 'Y':
    case 'i':
    case 'I':
      cout << "YES";
      break;
    default:
      cout << "NO";
      break;
  }
}
