#include <bits/stdc++.h>
using namespace std;
int c[10000];
int d[10000];
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  if (s1.size() != s2.size()) {
    cout << "No" << endl;
  } else {
    int i = 0;
    while (s1[i] != '\0') {
      if (s1[i] == 'a' || s1[i] == 'e' || s1[i] == 'i' || s1[i] == 'o' ||
          s1[i] == 'u') {
        c[i] = 1;
      }
      if (s2[i] == 'a' || s2[i] == 'e' || s2[i] == 'i' || s2[i] == 'o' ||
          s2[i] == 'u') {
        d[i] = 1;
      }
      i++;
    }
    bool flag = false;
    for (int i = 0; i < 26; i++) {
      if (c[i] != d[i]) {
        flag = true;
      }
    }
    if (flag)
      cout << "No" << endl;
    else {
      cout << "Yes" << endl;
    }
  }
  return 0;
}
