#include <bits/stdc++.h>
using namespace std;
string s, t;
bool isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
  return false;
}
int main() {
  ios::sync_with_stdio(0);
  cin >> s >> t;
  int n = (int)s.size();
  int m = (int)t.size();
  if (n != m) {
    cout << "No";
  } else {
    bool failed = false;
    for (int i = 0; i < n; i++) {
      if (isvowel(s[i]) != isvowel(t[i])) {
        failed = true;
        break;
      }
    }
    if (failed)
      cout << "No";
    else
      cout << "Yes";
  }
  return 0;
}
