#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[101];
  cin.getline(a, 101);
  int j = 0;
  for (int i = strlen(a) - 1; i >= 0; i--) {
    a[i] = tolower(a[i]);
    if (a[i] >= 'a' && a[i] <= 'z') {
      j = i;
      break;
    }
  }
  switch (a[j]) {
    case 'a':
      cout << "YES";
      return 0;
    case 'e':
      cout << "YES";
      return 0;
    case 'i':
      cout << "YES";
      return 0;
    case 'o':
      cout << "YES";
      return 0;
    case 'u':
      cout << "YES";
      return 0;
    case 'y':
      cout << "YES";
      return 0;
    default:
      cout << "NO";
  }
}
