#include <bits/stdc++.h>
using namespace std;
bool vowel(char c) {
  return (c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u');
}
void transform(string &s) {
  for (long long i = 0; i < s.size(); ++i) {
    if (vowel(s[i])) {
      s[i] = 'a';
    } else {
      s[i] = 'b';
    }
  }
}
int32_t main() {
  ios::sync_with_stdio(0), cin.tie(0), cout.tie(0);
  string s, t;
  cin >> s >> t;
  transform(s);
  transform(t);
  if (s == t) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
