#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int cont = 0;
  getline(cin, s);
  getline(cin, t);
  if (s.length() != t.length())
    cout << "No" << endl;
  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')
          cont++;
        else
          break;
      } else {
        if (t[i] != 'a' && t[i] != 'e' && t[i] != 'i' && t[i] != 'o' &&
            t[i] != 'u')
          cont++;
        else
          break;
      }
    }
    if (cont == s.length())
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
  return 0;
}
