#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  cin >> a >> b;
  if (a.length() != b.length()) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < a.length(); i++) {
    if (a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' ||
        a[i] == 'u') {
      if (b[i] == 'a' || b[i] == 'e' || b[i] == 'i' || b[i] == 'o' ||
          b[i] == 'u')
        continue;
      cout << "No";
      return 0;
    }
    if (b[i] == 'a' || b[i] == 'e' || b[i] == 'i' || b[i] == 'o' ||
        b[i] == 'u') {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
}
