#include <bits/stdc++.h>
using namespace std;
int dx[9] = {1, -1, 0, 0, 1, 1, -1, -1, 0};
int dy[9] = {0, 0, 1, -1, 1, -1, 1, -1, 0};
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  int i;
  cin >> s >> t;
  if (s.length() != t.length())
    cout << "No";
  else {
    set<char> k{'a', 'e', 'i', 'o', 'u'};
    for (i = 0; i < s.length(); i++) {
      if (k.find(s[i]) != k.end() && k.find(t[i]) == k.end())
        break;
      else if (k.find(s[i]) == k.end() && k.find(t[i]) != k.end())
        break;
      else
        continue;
    }
    if (i == s.length())
      cout << "Yes";
    else
      cout << "No";
  }
  return 0;
}
