#include <bits/stdc++.h>
using namespace std;
bool vowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') {
    return true;
  } else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  string a, b;
  cin >> a >> b;
  if (a.size() != b.size()) {
    cout << "No";
    return 0;
  }
  int c = 0;
  for (int i = 0; i < a.size(); i++) {
    if (vowel(a[i]) && vowel(b[i])) {
      c++;
    }
    if (!vowel(a[i]) && !vowel(b[i])) {
      c++;
    }
  }
  if (c == a.size()) {
    cout << "Yes";
  } else {
    cout << "No";
  }
  return 0;
}
