#include <bits/stdc++.h>
using namespace std;
bool check(char a, char b) {
  if ((a == 'a') or (a == 'e') or (a == 'i') or (a == 'o') or (a == 'u')) {
    if ((b == 'a') or (b == 'e') or (b == 'i') or (b == 'o') or (b == 'u')) {
      return true;
    }
  }
  if ((a != 'a') and (a != 'e') and (a != 'i') and (a != 'o') and (a != 'u')) {
    if ((b != 'a') and (b != 'e') and (b != 'i') and (b != 'o') and
        (a != 'u')) {
      return true;
    }
  }
  return false;
}
int main() {
  string s1, s2;
  cin >> s1 >> s2;
  if (s1.size() != s2.size()) {
    cout << "No" << endl;
    return 0;
  } else {
    for (int i = 0; i < s1.size(); i++) {
      if (check(s1[i], s2[i]) == false) {
        cout << "No" << endl;
        return 0;
      }
    }
  }
  cout << "Yes" << endl;
  return 0;
}
