#include <bits/stdc++.h>
using namespace std;
int main() {
  int c1 = 0, c2 = 0, i;
  char s[5000], t[5000];
  cin >> s >> t;
  if (strlen(s) == strlen(t)) {
    for (i = 0; i < strlen(s); 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;
      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') {
        cout << "NO" << endl;
        return 0;
      }
    }
    cout << "YES" << endl;
  } else
    cout << "NO" << endl;
}
