#include <bits/stdc++.h>
using namespace std;
int main() {
  string s, t;
  cin >> s >> t;
  int a = 0, b = 0;
  if (s.length() != t.length()) {
    cout << "No";
    return 0;
  }
  string c = "aeiou";
  for (int i = 0; i < s.length(); i++) {
    if ((find(c.begin(), c.end(), s[i]) == c.end() &&
         find(c.begin(), c.end(), t[i]) != c.end())) {
      cout << "NO";
      return 0;
    }
    if ((find(c.begin(), c.end(), t[i]) == c.end() &&
         find(c.begin(), c.end(), s[i]) != c.end())) {
      cout << "NO";
      return 0;
    }
  }
  cout << "Yes";
}
