#include <bits/stdc++.h>
using namespace std;
string s, t;
bool isconson(char chr) { return !strchr("aeiou", chr); }
bool transform() {
  if (s.size() != t.size()) return false;
  for (unsigned short i = 0; i != s.size(); ++i)
    if (isconson(s[i]) != isconson(t[i])) return false;
  return true;
}
int main() {
  cin >> s >> t;
  cout << (transform() ? "Yes" : "No");
  return 0;
}
