#include <bits/stdc++.h>
using namespace std;
int main() {
  int i, j, k, l, m, n;
  string t1, t2;
  cin >> t1 >> t2;
  l = t1.size();
  if (l != t2.size()) {
    cout << "No";
    return 0;
  }
  for (i = 0; i < l; i++) {
    if (((t1[i] == 'a' || t1[i] == 'e' || t1[i] == 'i' || t1[i] == 'o' ||
          t1[i] == 'u') &&
         !(t2[i] == 'a' || t2[i] == 'e' || t2[i] == 'i' || t2[i] == 'o' ||
           t2[i] == 'u'))) {
      cout << "No";
      return 0;
    }
    if ((!(t1[i] == 'a' || t1[i] == 'e' || t1[i] == 'i' || t1[i] == 'o' ||
           t1[i] == 'u') &&
         (t2[i] == 'a' || t2[i] == 'e' || t2[i] == 'i' || t2[i] == 'o' ||
          t2[i] == 'u'))) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
