#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  if (s.size() != t.size()) {
    cout << "no" << endl;
  } else {
    int a = 0, b = 0, fg = 0;
    for (int i = 0; i < s.size(); 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')) {
        fg = 1;
        break;
      }
      if ((t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' ||
           t[i] == 'u') &&
          (s[i] != 'a' && s[i] != 'e' && s[i] != 'i' && s[i] != 'o' &&
           s[i] != 'u')) {
        fg = 1;
        break;
      }
    }
    if (fg == 0) {
      cout << "yes" << endl;
    } else {
      cout << "no" << endl;
    }
  }
}
