문제

링크

풀이

#include <iostream>
#include <string>
using namespace std;
 
inline bool vowel(char c) {
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
 
inline bool palindrome(const string &s) {
  for (int i=0; i<s.length()/2; i++) {
    if (s[i] != s[s.length()-i-1]) return false;
  }
  return true;
}
 
bool solve(void) {
  string s; cin >> s;
 
  string t;
  for (char c : s) {
    if (vowel(c)) t += c;
  }
  return palindrome(t);
}
 
int main(void) {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
 
  cout << (solve() ? 'S' : 'N');
  return 0;
}