#include <bits/stdc++.h>
using namespace std;
char _;
long long power(long long x, long long y) {
  long long res = 1;
  while (y > 0) {
    if (y & 1) res = (res * x) % 1000000007;
    y = y >> 1;
    x = (x * x) % 1000000007;
  }
  return res % 1000000007;
}
long long lis(long long arr[], long long n) {
  long long lis[n];
  lis[0] = 1;
  for (int i = 1; i < n; i++) {
    lis[i] = 1;
    for (int j = 0; j < i; j++)
      if (arr[i] > arr[j] && lis[i] < lis[j] + 1) lis[i] = lis[j] + 1;
  }
  return *max_element(lis, lis + n);
}
bool check(char s) {
  if (s == 'i' or s == 'o' or s == 'a' or s == 'e' or s == 'u') return true;
  return false;
}
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.tie(0);
  int a1 = 0, a2 = 0;
  int b1 = 0, b2 = 0;
  string s1, s2;
  cin >> s1 >> s2;
  if (s1.size() != s2.size()) {
    cout << "No";
    return 0;
  }
  for (int i = 0; i < s1.size(); ++i) {
    if (check(s1[i]) != check(s2[i])) {
      cout << "No";
      return 0;
    }
  }
  cout << "Yes";
  return 0;
}
