#include <bits/stdc++.h>
using namespace std;
void lol() {
  string a, b;
  getline(cin >> ws, a);
  getline(cin >> ws, b);
  if (a.size() != b.size())
    cout << "NO" << endl;
  else {
    bool arr[26] = {0};
    arr[0] = 1;
    arr['e' - 'a'] = 1;
    arr['i' - 'a'] = 1;
    arr['o' - 'a'] = 1;
    arr['u' - 'a'] = 1;
    int i = 0;
    for (i = 0; i < a.size(); ++i) {
      if ((arr[a[i] - 'a'] ^ arr[b[i] - 'a'])) break;
    }
    if (i == a.size())
      cout << "YES" << endl;
    else
      cout << "NO" << endl;
  }
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  lol();
}
