#include <bits/stdc++.h>
using namespace std;
int main() {
  {
    ios_base::sync_with_stdio(false);
    cin.tie(NULL);
  };
  long long i;
  string second, t;
  bool flag = false;
  cin >> second >> t;
  if (second.size() != t.size())
    flag = true;
  else {
    for (i = 0; i < second.size(); i++) {
      if (second[i] == 'a' || second[i] == 'e' || second[i] == 'i' ||
          second[i] == 'o' || second[i] == 'u') {
        if (t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' ||
            t[i] == 'u')
          continue;
        else {
          flag = true;
          break;
        }
      } else {
        if (t[i] != 'a' && t[i] != 'e' && t[i] != 'i' && t[i] != 'o' &&
            t[i] != 'u')
          continue;
        else {
          flag = true;
          break;
        }
      }
    }
  }
  if (flag)
    cout << "No";
  else
    cout << "Yes";
  cout << "\n";
  return 0;
}
