#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  int count = 0;
  cin >> s;
  cin >> t;
  if (s.length() != t.length()) {
    cout << "No" << endl;
    return 0;
  } else {
    for (int i = 0; i < s.length(); i++) {
      if (s[i] == 'a' or s[i] == 'e' or s[i] == 'i' or s[i] == 'o' or
          s[i] == 'u') {
        if (t[i] == 'a' or t[i] == 'e' or t[i] == 'i' or t[i] == 'o' or
            t[i] == 'u') {
          count++;
        }
      } else if (s[i] != 'a' and s[i] != 'e' and s[i] != 'i' and s[i] != 'o' and
                 s[i] != 'u') {
        if (t[i] != 'a' and t[i] != 'e' and t[i] != 'i' and t[i] != 'o' and
            t[i] != 'u') {
          count++;
        }
      }
    }
    if (count == s.length())
      cout << "Yes" << endl;
    else
      cout << "No" << endl;
  }
}
