#include <bits/stdc++.h>
using namespace std;
long long const mod = 1e9 + 7;
long long power(long long x, long long y, long long mod = 2e18) {
  long long ans = 1;
  x %= mod;
  while (y) {
    if (y & 1) ans = (x * ans) % mod;
    x = (x * x) % mod;
    y >>= 1;
  }
  return ans;
}
long long gcd(long long a, long long b) {
  if (a == 0) return b;
  return gcd(b % a, a);
}
bool comp(char a, char b) {
  if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u') {
    if (b == 'a' || b == 'e' || b == 'i' || b == 'o' || b == 'u') {
      return 1;
    } else
      return 0;
  }
  if (b == 'a' || b == 'e' || b == 'i' || b == 'o' || b == 'u') {
    if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u')
      return 1;
    else
      return 0;
  }
  return 1;
}
signed main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  ;
  string a, b;
  cin >> a >> b;
  if (a.size() != b.size()) return cout << "No", 0;
  for (long long i = 0; i < a.size(); i++) {
    if (!comp(a[i], b[i])) {
      return cout << "No", 0;
    }
  }
  cout << "Yes";
  return 0;
}
