#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  ;
  string a, b;
  cin >> a >> b;
  if (a.size() != b.size())
    cout << "NO";
  else {
    for (int i = 0; i < a.size(); i++) {
      if ((strchr("aeiou", a[i]) && strchr("aeiou", b[i])) ||
          (!strchr("aeiou", a[i]) && !strchr("aeiou", b[i])))
        continue;
      else {
        cout << "No";
        return 0;
      }
    }
    cout << "Yes";
  }
}
