#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1001], t[1001];
  cin >> s >> t;
  int ns = strlen(s);
  int nt = strlen(t);
  int n = min(ns, nt);
  bool done = true;
  int vs = 0, cs = 0, vt = 0, ct = 0;
  for (int i = 0; i < n; i++) {
    if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
        s[i] == 'u') {
      vs++;
    } else {
      cs++;
    }
    if (t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' ||
        t[i] == 'u') {
      vt++;
    } else {
      ct++;
    }
    if (vs != vt && cs != ct) {
      done = false;
      break;
    }
  }
  if (vs == vt && cs == ct && ns == nt && done) {
    cout << "Yes" << endl;
  } else {
    cout << "No" << endl;
  }
  return 0;
}
