#include <bits/stdc++.h>
using namespace std;
bool vowel(char s) {
  if (s == 'a' || s == 'e' || s == 'i' || s == 'o' || s == 'u')
    return true;
  else
    return false;
}
int main() {
  string s, t;
  cin >> s >> t;
  if (s.size() != t.size())
    cout << "No" << endl;
  else {
    int count1 = 0, count2 = 0;
    bool flag = 0;
    for (int i = 0; i < s.size(); i++) {
      if (vowel(s[i])) count1++;
      if (vowel(t[i])) count2++;
      if (count1 != count2) {
        flag = 1;
        break;
      }
    }
    if (flag)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
}
