#include <bits/stdc++.h>
using namespace std;
int ch(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return 10;
  return 5;
}
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string a, b;
  cin >> a >> b;
  if ((int)(a.size()) != (int)(b.size())) {
    cout << "No" << endl;
    return 0;
  }
  bool ans = 1;
  for (int i = 0; i < (int)(a.size()); i++) {
    ans &= (ch(a[i]) == ch(b[i]));
  }
  cout << (ans ? "Yes" : "No") << endl;
}
