#include <bits/stdc++.h>
using namespace std;
bool isVowel(char c) {
  if (c == 'a' or c == 'e' or c == 'i' or c == 'o' or c == 'u') return true;
  return false;
}
int main() {
  string n, m;
  while (cin >> n >> m) {
    bool mal = false;
    if (n.size() != m.size()) mal = true;
    for (int i = 0; !mal and i < n.size(); i++) {
      if (isVowel(n[i]) != isVowel(m[i])) mal = true;
    }
    if (mal)
      cout << "No" << endl;
    else
      cout << "Yes" << endl;
  }
}
