#include <bits/stdc++.h>
using namespace std;
string a, b;
map<char, bool> vowel = {{'a', 1}, {'e', 1}, {'i', 1}, {'o', 1}, {'u', 1}};
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cin >> a >> b;
  if (a.size() == b.size()) {
    for (int i = 0; i < a.size(); i++) {
      if (vowel[a[i]] != vowel[b[i]]) {
        cout << "No\n";
        return 0;
      }
    }
    cout << "Yes\n";
  } else {
    cout << "No\n";
  }
  return 0;
}
