#include <bits/stdc++.h>
using namespace std;
string s, t;
bool ok[300];
int main() {
  ok['a'] = ok['e'] = ok['i'] = ok['o'] = ok['u'] = true;
  cin >> s >> t;
  int ls = s.size(), lt = t.size();
  if (ls != lt) {
    cout << "No" << endl;
    return 0;
  }
  for (int i = 0; i < ls; i++) {
    if (s[i] != t[i]) {
      if (ok[s[i]] != ok[t[i]]) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
