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