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