Problem: Vasya plays the sleuth with his friends. The rules of the game are as follows: those who play for the first time, that is Vasya is the sleuth, he should investigate a "crime" and find out what is happening. He can ask any questions whatsoever that can be answered with "Yes" or "No". All the rest agree beforehand to answer the questions like that: if the question’s last letter is a vowel, they answer "Yes" and if the last letter is a consonant, they answer "No". Of course, the sleuth knows nothing about it and his task is to understand that.

Unfortunately, Vasya is not very smart. After 5 hours of endless stupid questions everybody except Vasya got bored. That’s why Vasya’s friends ask you to write a program that would give answers instead of them.

The English alphabet vowels are: A, E, I, O, U, Y

The English alphabet consonants are: B, C, D, F, G, H, J, K, L, M, N, P, Q, R, S, T, V, W, X, Z

Input

The single line contains a question represented by a non-empty line consisting of large and small Latin letters, spaces and a question mark. The line length does not exceed 100. It is guaranteed that the question mark occurs exactly once in the line — as the last symbol and that the line contains at least one letter.

Output

Print answer for the question in a single line: YES if the answer is "Yes", NO if the answer is "No".

Remember that in the reply to the question the last letter, not the last character counts. I. e. the spaces and the question mark do not count as letters.

Examples

Input

Is it a melon?


Output

NO


Input

Is it an apple?


Output

YES


Input

  Is     it a banana ?


Output

YES


Input

Is   it an apple  and a  banana   simultaneouSLY?


Output

YES

Solution (in CPP):

Solution:
#include <bits/stdc++.h>
using namespace std;
void fastInOut();
int maxXor(int l, int r) {
  int a = l, b = l, c, max = -1;
  while (true) {
    if (b > r) {
      a++;
      b = a;
    }
    if (a > r && b > r) break;
    c = a ^ b;
    if (c > max) max = c;
    b++;
  }
  return max;
}
long long magi;
vector<long long> magg;
void magic(string s) {
  stringstream(s) >> magi;
  magg.push_back(magi);
  if (s.size() >= 11) return;
  magic(s + '1');
  magic(s + "14");
  magic(s + "144");
}
int mood;
void print(int n, int l) {
  if (!l) return;
  print(n >> 1, l - 1);
  cout << (n & 1) << endl;
}
unsigned long long power(unsigned long long b, unsigned long long pow) {
  if (b == 0)
    return 0;
  else if (pow == 1)
    return b;
  else if (pow % 2 == 0)
    return power(b * b, pow / 2);
  else
    return b * power(b * b, pow / 2);
}
string final;
int dp[100][100], res;
vector<int> v;
int summ(int i, int sum) {
  if (sum == res) {
    final = "YES";
    return 1;
  }
  if (i == (int)v.size()) return 0;
  if (dp[i][sum] != -1) {
    cout << dp[i][sum] << endl;
    return dp[i][sum];
  }
  return dp[i][sum] = max(summ(i + 1, sum + v[i]), summ(i + 1, sum));
}
char check(vector<int> vl, vector<int> vr) {
  int suml = accumulate(vl.begin(), vl.end(), 0);
  int sumr = accumulate(vr.begin(), vr.end(), 0);
  if (suml % 2 && sumr % 2) return 'o';
  if (suml % 2 == 0 && sumr % 2 == 0)
    return 'e';
  else
    return 'n';
}
bool gigaa(int x) {
  while (x > 0) {
    if (x % 10 == 8) return true;
    x /= 10;
  }
  return false;
}
vector<long long> vcode;
long long xxx;
void luky(string s) {
  stringstream(s) >> xxx;
  vcode.push_back(xxx);
  if (s.size() >= 4) return;
  for (char i = 48; i < 58; i++) {
    luky(s + i);
  }
}
int dr(string s) {
hell:
  int d = 0;
  for (int i = 0; i < (int)s.size(); i++) d += (s[i] - 48);
  if (d < 10)
    return d;
  else {
    stringstream ss;
    ss << d;
    s = ss.str();
    goto hell;
  }
}
string pluss(string s) {
  for (int i = s.size() - 1; i >= 0; i--) {
    if (s[i] == '9')
      s[i] = 48;
    else {
      s[i]++;
      break;
    }
  }
  return s;
}
bool prim(int x) {
  for (int i = x - 1; i > 1; i--) {
    if (x % i == 0) return false;
  }
  return true;
}
int sam(int x) {
  int samm = 0;
  while (x > 0) {
    samm += x % 10;
    x /= 10;
  }
  return samm;
}
int powerr(double z, int i) {
  int zz = 1;
  for (int k = 0; k < i; k++) {
    zz *= z;
  }
  return zz;
}
long long power(long long x, long long y) {
  long long z = 1;
  for (long long i = 0; i < y; i++) z *= x;
  return z;
}
bool pal(string s) {
  for (int i = 0, k = s.size() - 1; i < (int)(s.size() / 2); i++, k--)
    if (s[i] != s[k]) return false;
  return true;
}
int y[60][60], n, m, ci, ck;
void paint(int ri, int rk) {
  for (int i = min(ri, ci); i <= max(ri, ci); i++)
    for (int k = min(rk, ck); k <= max(rk, ck); k++)
      if (y[i][k] == 1 || y[i][k] == 2)
        y[i][k] = 2;
      else
        y[i][k] = -1;
}
bool check() {
  for (int i = 0; i < n; i++)
    for (int k = 0; k < m; k++)
      if (y[i][k] == -1 || y[i][k] == 2)
        ;
      else
        return true;
  return false;
}
int checkc(int i, int k) {
  int rr[] = {0, n - 1, 0, n - 1}, cc[] = {0, 0, m - 1, m - 1}, c = 0, res = 0;
  for (int f = 0; f < 4; f++) {
    c = 0;
    for (int ii = min(i, rr[f]); ii <= max(i, rr[f]); ii++)
      for (int kk = min(k, cc[f]); kk <= max(k, cc[f]); kk++)
        if (y[ii][kk] == 0 || y[ii][kk] == 1) c++;
    if (c > res) {
      res = c;
      ci = rr[f];
      ck = cc[f];
    }
  }
  return res;
}
vector<int> vg, resg;
int sg;
void coin(int i, vector<int> vgg, int sum) {
  if (sum >= sg && (*min_element(vgg.begin(), vgg.end())) > sum - sg) {
    if (vgg.size() > resg.size()) resg = vgg;
    return;
  }
  if (i == (int)vg.size()) return;
  vgg.push_back(vg[i]);
  coin(i + 1, vgg, sum + vg[i]);
  if (!vgg.empty()) vgg.pop_back();
  coin(i + 1, vgg, sum);
}
int main() {
  fastInOut();
  string s, res = "NO";
  getline(cin, s);
  for (int i = 0; i < s.size(); i++) s[i] = tolower(s[i]);
  for (int i = s.size() - 1; i >= 0; i--)
    if (s[i] != '?' && s[i] != ' ')
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u' || s[i] == 'y')
        res = "YES";
      else
        break;
  cout << res;
  return 0;
}
void fastInOut() {
  ios_base::sync_with_stdio(0);
  cin.tie(NULL), cout.tie(NULL);
}