#include <bits/stdc++.h>
using namespace std;
const int mxN = 2e5;
const int MOD = 1e9 + 7;
template <typename ForwardIterator, typename T>
ForwardIterator first_less_than(ForwardIterator first, ForwardIterator last,
                                T value) {
  auto it = std::lower_bound(first, last, value);
  return (it == first ? last : --it);
}
bool sortbysec(const pair<int, int> &a, const pair<int, int> &b) {
  return (a.second < b.second);
}
bool check(char ch) {
  if (ch == 'a' || ch == 'e' || ch == 'i' || ch == 'o' || ch == 'u')
    return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  long long t;
  t = 1;
  while (t--) {
    long long n, i, j, k;
    string s, t;
    cin >> s >> t;
    if (s.size() != t.size()) {
      cout << "NO"
           << "\n";
      continue;
    }
    bool ok = true;
    for (i = 0; i < s.size(); i++) {
      bool f1 = check(s[i]);
      bool f2 = check(t[i]);
      if (f1 && !f2 || f2 && !f1) ok = false;
    }
    if (ok)
      cout << "YES"
           << "\n";
    else
      cout << "NO"
           << "\n";
  }
}
