#include <bits/stdc++.h>
using namespace std;
bool check(char ch) {
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  else
    return false;
}
int main(void) {
  string a, b;
  cin >> a >> b;
  int n = a.length(), m = b.length();
  if (n != m) {
    cout << "NO\n";
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (check(a[i]) != check(b[i])) {
      cout << "NO\n";
      return 0;
    }
  }
  cout << "YES\n";
  return 0;
}
