#include <bits/stdc++.h>
using namespace std;
string s, t;
int w;
char a[10];
int main() {
  cin >> s >> t;
  if (s.size() != t.size()) cout << "NO", exit(0);
  a[0] = 'a', a[1] = 'u', a[2] = 'e', a[3] = 'i', a[4] = 'o';
  for (int i = 0; i < s.size(); i++) {
    for (int j = 0; j < 5; j++) {
      if (s[i] == a[j]) w++;
      if (t[i] == a[j]) w++;
    }
    if (w % 2 == 1) cout << "NO", exit(0);
  }
  cout << "YES";
}
