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