#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  long long int n, m;
  n = s.length();
  m = t.length();
  long long int i, j, s1 = 0, s2 = 0, t1 = 0, t2 = 0;
  if (n != m) {
    cout << "No";
    exit(0);
  }
  for (i = 0; i < n; i++) {
    if (((s[i] == 'a' || s[i] == 'e' || s[i] == 'o' || s[i] == 'u' ||
          s[i] == 'i') &&
         (t[i] == 'a' || t[i] == 'e' || t[i] == 'o' || t[i] == 'u' ||
          t[i] == 'i')) ||
        ((s[i] != 'a' && s[i] != 'e' && s[i] != 'o' && s[i] != 'u' &&
          s[i] != 'i') &&
         (t[i] != 'a' && t[i] != 'e' && t[i] != 'o' && t[i] != 'u' &&
          t[i] != 'i')))
      continue;
    else {
      cout << "No";
      exit(0);
    }
  }
  cout << "Yes";
}
