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