#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  char vowels[] = {'a', 'e', 'i', 'o', 'u'};
  string s, t;
  cin >> s >> t;
  if (s.length() != t.length()) {
    cout << "No" << endl;
    return 0;
  }
  vector<int> comp;
  for (int i = 0; i < s.length(); ++i) {
    int vowel_found = 0;
    for (int j = 0; j < 5; ++j) {
      if (s[i] == vowels[j]) {
        comp.push_back(1);
        vowel_found = 1;
        break;
      }
    }
    if (vowel_found == 0) {
      comp.push_back(0);
    }
  }
  for (int i = 0; i < t.length(); ++i) {
    int vowel_found = 0;
    for (int j = 0; j < 5; ++j) {
      if (t[i] == vowels[j]) {
        if (comp[i] == 0) {
          cout << "No" << endl;
          return 0;
        }
        vowel_found = 1;
      }
    }
    if (vowel_found == 0 && comp[i] == 1) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
  return 0;
}
