#include <bits/stdc++.h>
#pragma GCC optimize("O2")
using namespace std;
const int INF = int(2e9) + 99;
bool check_vowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
    return true;
  else
    return false;
}
void test_case() {
  string s, t;
  cin >> s >> t;
  if (s.size() != t.size()) {
    cout << "No\n";
    return;
  }
  for (int i = 0; i < t.size(); i++) {
    if ((!check_vowel(s[i]) && check_vowel(t[i])) ||
        (check_vowel(s[i]) && !check_vowel(t[i]))) {
      cout << "No\n";
      return;
    }
  }
  cout << "Yes\n";
  return;
}
int main() {
  cin.tie(0);
  cout.tie(0);
  ios_base::sync_with_stdio(false);
  int t = 1;
  while (t--) test_case();
  return 0;
}
