#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  getline(cin, s);
  getline(cin, t);
  if (s.length() != t.length()) {
    cout << "NO" << endl;
    return 0;
  } else {
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u') {
        if (t[i] != 'a' && t[i] != 'e' && t[i] != 'i' && t[i] != 'o' &&
            t[i] != 'u') {
          cout << "NO" << endl;
          return 0;
        }
      } else {
        if (t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' ||
            t[i] == 'u') {
          cout << "NO" << endl;
          return 0;
        }
      }
    }
  }
  cout << "YES" << endl;
}
