#include <bits/stdc++.h>
using namespace std;
int nv1, nc1, nv2, nc2, f = 0, l;
int main() {
  string str1, str2;
  cin >> str1 >> str2;
  vector<int> v1, v2;
  for (int i = 0; i < str1.size(); i++) {
    if (str1[i] == 'a' || str1[i] == 'e' || str1[i] == 'i' || str1[i] == 'o' ||
        str1[i] == 'u') {
      nv1++;
      v1.push_back(i);
    } else
      nc1++;
  }
  for (int i = 0; i < str2.size(); i++) {
    if (str2[i] == 'a' || str2[i] == 'e' || str2[i] == 'i' || str2[i] == 'o' ||
        str2[i] == 'u') {
      nv2++;
      v2.push_back(i);
    } else
      nc2++;
  }
  if (nv1 == nv2) {
    for (int i = 0; i < v1.size(); i++) {
      if (v1[i] == v2[i])
        f = 1;
      else {
        f = 0;
        break;
      }
    }
  }
  if (nv1 == 0 && nv2 == 0) {
    if (nc1 == nc2) {
      if (nc1 != 0) {
        cout << "Yes" << endl;
        l = 1;
      }
    }
  }
  if (l != 1) {
    if (f == 1 && nv1 == nv2 && nc1 == nc2) {
      cout << "Yes" << endl;
    } else
      cout << "NO" << endl;
  }
  return 0;
}
