#include <bits/stdc++.h>
using namespace std;
int main() {
  char a[5] = {'a', 'e', 'i', 'o', 'u'};
  char c[2333], b[2333];
  cin >> c;
  cin >> b;
  if (strlen(c) != strlen(b)) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i <= strlen(b) - 1; i++) {
    int k = 0;
    for (int o = 0; o <= 4; o++) {
      if (a[o] == c[i]) {
        k++;
      }
      if (a[o] == b[i]) {
        k++;
      }
    }
    if (k == 1) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
