#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  if (a.length() != b.length()) {
    cout << "No";
  } else {
    int l = a.length();
    for (int i = 0; i < l; i += 1) {
      if (a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' ||
          a[i] == 'u') {
        if (b[i] == 'a' || b[i] == 'e' || b[i] == 'i' || b[i] == 'o' ||
            b[i] == 'u') {
          continue;
        } else {
          cout << "No";
          return 0;
        }
      } else if (a[i] != 'a' && a[i] != 'e' && a[i] != 'i' && a[i] != 'o' &&
                 a[i] != 'u') {
        if (b[i] != 'a' && b[i] != 'e' && b[i] != 'i' && b[i] != 'o' &&
            b[i] != 'u') {
          continue;
        } else {
          cout << "No";
          return 0;
        }
      }
    }
    cout << "Yes";
  }
}
