#include <bits/stdc++.h>
using namespace std;
int main() {
  char s[1005], t[1005];
  cin >> s;
  cin >> t;
  if (strlen(s) != strlen(t)) {
    cout << "No";
    return 0;
  } else {
    bool ok = 1;
    for (unsigned int i = 0; i < strlen(s); i++) {
      if ((strchr("aeiou", s[i]) && !strchr("aeiou", t[i])) ||
          (!strchr("aeiou", s[i]) && strchr("aeiou", t[i]))) {
        ok = 0;
        break;
      }
    }
    if (ok) {
      cout << "Yes";
    } else {
      cout << "No";
    }
    return 0;
  }
}
