#include <bits/stdc++.h>
#pragma GCC optimize("Ofast")
#pragma GCC optimize("unroll-loops")
#pragma GCC target("sse,sse2,sse3,ssse3,sse4,popcnt,abm,mmx,avx,tune=native")
using namespace std;
string n, k;
bool isvowel(char x) {
  return (x == 'a' || x == 'e' || x == 'u' || x == 'i' || x == 'o');
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cin >> n >> k;
  if (n.size() == k.size()) {
    for (int i = 0; i < n.size(); i++) {
      if (isvowel(n[i]) && !isvowel(k[i])) {
        cout << "No";
        return 0;
      }
      if (isvowel(k[i]) && !isvowel(n[i])) {
        cout << "No";
        return 0;
      }
    }
    cout << "Yes";
  } else
    cout << "No";
  return 0;
}
