#include <bits/stdc++.h>
using namespace std;
const long long mod = 1e9 + 7;
const long long size = 1e5 + 7;
int main() {
  cout << setprecision(12) << fixed;
  string s, t;
  cin >> s >> t;
  long long n = s.length();
  long long m = t.length();
  if (n != m) {
    cout << "No" << endl;
    return 0;
  }
  long long c1 = 0, c2 = 0;
  for (long long i = 0; i < n; i++) {
    long long f1 = 0, f2 = 0;
    if (s[i] == 'a' or s[i] == 'e' or s[i] == 'i' or s[i] == 'o' or s[i] == 'u')
      f1 = 1;
    if (t[i] == 'a' or t[i] == 'e' or t[i] == 'i' or t[i] == 'o' or t[i] == 'u')
      f2 = 1;
    if (f1 != f2) {
      cout << "No" << endl;
      return 0;
    }
  }
  cout << "Yes" << endl;
}
