#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(false);
  cin.tie(0);
  ;
  string s1, s2;
  cin >> s1 >> s2;
  bool flag = 1;
  if (s1.size() != s2.size()) {
    cout << "no";
    return 0;
  }
  for (int i = 0; i < s1.size(); i++) {
    if ((s1[i] == 'a' || s1[i] == 'e' || s1[i] == 'i' || s1[i] == 'o' ||
         s1[i] == 'u') and
        !(s2[i] == 'a' || s2[i] == 'e' || s2[i] == 'i' || s2[i] == 'o' ||
          s2[i] == 'u'))
      flag = 0;
  }
  swap(s1, s2);
  for (int i = 0; i < s1.size(); i++) {
    if ((s1[i] == 'a' || s1[i] == 'e' || s1[i] == 'i' || s1[i] == 'o' ||
         s1[i] == 'u') and
        !(s2[i] == 'a' || s2[i] == 'e' || s2[i] == 'i' || s2[i] == 'o' ||
          s2[i] == 'u'))
      flag = 0;
  }
  cout << (flag ? "Yes\n" : "No\n");
}
