#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  string s, w;
  cin >> s >> w;
  int n = s.length(), m = w.length();
  if (n != m) {
    cout << "No";
    return 0;
  }
  char vow[] = {'a', 'e', 'i', 'u', 'o'};
  for (int i = 0; i < n; i++) {
    if (count(vow, vow + 5, s[i]) == 1 && count(vow, vow + 5, w[i]) == 1) {
      continue;
    } else if (count(vow, vow + 5, s[i]) == 0 &&
               count(vow, vow + 5, w[i]) == 0) {
      continue;
    }
    cout << "No";
    return 0;
  }
  cout << "Yes";
}
