#include <bits/stdc++.h>
using namespace std;
class ASuperheroTransformation {
 public:
  void solve(std::istream& in, std::ostream& out) {
    string a, b;
    in >> a >> b;
    if (a.length() != b.length()) {
      out << "No";
      return;
    }
    long long flag = 1, n = a.length();
    map<char, long long> mm;
    for (long long i = 0; i < 26; i++) mm[(char)(i + 'a')] = 0;
    mm['a'] = mm['e'] = mm['i'] = mm['o'] = mm['u'] = 1;
    for (long long i = 0; i < n; i++)
      if (mm[a[i]] != mm[b[i]]) flag = 0;
    if (flag)
      out << "Yes";
    else
      out << "No";
  }
};
signed main() {
  ASuperheroTransformation solver;
  std::istream& in(std::cin);
  std::ostream& out(std::cout);
  solver.solve(in, out);
  return 0;
}
