#include <bits/stdc++.h>
using namespace std;
bool is_Vowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u')
    return true;
  else
    return false;
}
int main() {
  string s, t;
  cin >> s >> t;
  if (s.length() != t.length())
    cout << "No";
  else {
    for (int i = 0; i < s.length(); i++) {
      if (is_Vowel(s[i]) != is_Vowel(t[i])) {
        cout << "No";
        return 0;
      }
    }
    cout << "Yes";
  }
  return 0;
}
