#include <bits/stdc++.h>
using namespace std;
const int inf = 0x3f3f3f3f;
const long long linf = 0x3f3f3f3f3f3f3f;
const double eps = 1e-6;
const double pi = 3.14159265358979;
const int maxn = 2e5 + 5;
const int maxm = 2e5 + 5;
const int mod = 1e9 + 7;
inline long long read() {
  char c = getchar();
  int x = 0, f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') x = x * 10 + c - '0', c = getchar();
  return x * f;
}
bool check(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 true;
    else
      return false;
  else if (b != 'a' && b != 'e' && b != 'i' && b != 'o' && b != 'u')
    return true;
  else
    return false;
}
int main() {
  ios_base::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  string s, t;
  cin >> s >> t;
  if (s.length() != t.length())
    cout << "No" << '\n';
  else {
    int len = s.length();
    for (int i = 0; i < len; ++i) {
      if (!check(s[i], t[i])) {
        cout << "No" << '\n';
        return 0;
      }
    }
    cout << "Yes" << '\n';
  }
  return 0;
}
