#include <bits/stdc++.h>
using namespace std;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL), cout.tie(NULL);
  long long i, j;
  string s1, s2;
  cin >> s1 >> s2;
  long long l1, l2;
  l1 = s1.length();
  l2 = s2.length();
  if (l1 != l2) {
    cout << "No";
    return 0;
  }
  long long f = 1;
  for (i = 0; i < l1; i++) {
    if ((s1[i] == 'a' || s1[i] == 'e' || s1[i] == 'i' || s1[i] == 'o' ||
         s1[i] == 'u') &&
        (s2[i] != 'a' && s2[i] != 'e' && s2[i] != 'i' && s2[i] != 'o' &&
         s2[i] != 'u'))
      f = 0;
    if ((s2[i] == 'a' || s2[i] == 'e' || s2[i] == 'i' || s2[i] == 'o' ||
         s2[i] == 'u') &&
        (s1[i] != 'a' && s1[i] != 'e' && s1[i] != 'i' && s1[i] != 'o' &&
         s1[i] != 'u'))
      f = 0;
  }
  if (f == 0)
    cout << "No";
  else
    cout << "Yes";
  return 0;
}
