#include <bits/stdc++.h>
using namespace std;
void adskiy_razgon() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
}
const int MAX_N = 1e+4 * 3 + 33;
const int MOD = 1e+9 + 7;
const long long INF = 1e+18;
int nod(int a, int b) {
  if (a == 0 || b == 0) {
    return 0;
  } else if (a == b) {
    return a;
  } else if (a > b) {
    return nod(a - b, b);
  } else {
    return nod(a, b - a);
  }
}
int nok(int a, int b) { return a * b / nod(a, b); }
int main() {
  adskiy_razgon();
  string s;
  getline(cin, s);
  char ans;
  for (int i = 0; i < s.size(); i++) {
    if ((int(s[i]) > 64 && int(s[i]) < 91) ||
        (int(s[i]) > 96 && int(s[i]) < 123)) {
      ans = s[i];
    }
  }
  if (ans == 'a' || ans == 'o' || ans == 'u' || ans == 'i' || ans == 'y' ||
      ans == 'A' || ans == 'O' || ans == 'U' || ans == 'I' || ans == 'Y' ||
      ans == 'e' || ans == 'E') {
    cout << "YES";
    return 0;
  } else {
    cout << "NO";
    return 0;
  }
  return 0;
}
