#include <bits/stdc++.h>
using namespace std;
int check(char i) {
  if (i == 'a' || i == 'e' || i == 'o' || i == 'i' || i == 'u') return 0;
  return 1;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int TESTS = 1;
  while (TESTS--) {
    string str, str2;
    int v1 = 0, c1 = 0, v2 = 0, c2 = 0;
    cin >> str >> str2;
    if (str.size() != str2.size()) {
      cout << "NO";
      return 0;
    }
    for (long long int i = 0; i < str.size(); i++) {
      if (check(str[i]) == check(str2[i]))
        continue;
      else {
        cout << "NO" << '\n';
        return 0;
      }
    }
    cout << "YES";
  }
  return 0;
}
