#include <bits/stdc++.h>
using namespace std;
char vo[5] = {'a', 'e', 'i', 'o', 'u'};
string s1, s2;
int in(char c) {
  for (int i = 0; i < 5; i++)
    if (c == vo[i]) return 1;
  return 0;
}
bool cmp() {
  for (int i = 0; i < s1.length(); i++) {
    if (in(s1[i]) ^ in(s2[i])) return false;
  }
  return true;
}
int main() {
  cin >> s1 >> s2;
  if (s1.length() != s2.length() || !cmp())
    cout << "No" << endl;
  else
    cout << "Yes" << endl;
  return 0;
}
