#include <bits/stdc++.h>
using namespace std;
const int MAX = 1e5 + 10;
const long long MOD = 1e9 + 7;
int N, M, K, Q;
bool check(char a, char b) {
  if ((a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u') &&
      (b != 'a' && b != 'e' && b != 'i' && b != 'o' && b != 'u'))
    return false;
  return true;
}
int main() {
  int i, j, k;
  string s, t;
  cin >> s >> t;
  if (s.size() != t.size()) {
    printf("No");
    return 0;
  }
  for (i = 0; i < s.size(); ++i) {
    char tmp1 = s[i];
    char tmp2 = t[i];
    if (!check(tmp1, tmp2) || !check(tmp2, tmp1)) {
      printf("No");
      return 0;
    }
  }
  printf("Yes");
}
