#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s;
  cin >> t;
  if (s.size() != t.size()) {
    cout << "No\n";
    return 0;
  }
  string d = "aeiou";
  bool f, f1;
  for (int i = 0; i < s.size(); i++) {
    f = false, f1 = false;
    for (int j = 0; j < d.size(); j++) {
      if (s[i] == d[j]) f = true;
      if (t[i] == d[j]) f1 = true;
    }
    if (f != f1) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
