#include <bits/stdc++.h>
using namespace std;
long long isvowel(char c) {
  if (c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u') return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  string a, b;
  cin >> a >> b;
  long long n = a.length();
  long long m = b.length();
  if (n != m) return cout << "No", 0;
  ;
  for (long long i = 0; i < n; i++) {
    long long f1 = isvowel(a[i]);
    long long f2 = isvowel(b[i]);
    if (f1 != f2) return cout << "No", 0;
    ;
  }
  return cout << "Yes", 0;
  ;
}
