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