#include <bits/stdc++.h>
using namespace std;
const int Maxn = 1e6 + 7;
const int Inf = 1e9 + 7;
int N, M;
char s[Maxn], t[Maxn];
int check(char a) {
  if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u') {
    return 1;
  } else {
    return 2;
  }
}
int main() {
  while (~scanf(" %s %s", s, t)) {
    int len1 = strlen(s), len2 = strlen(t);
    if (len1 != len2) {
      printf("No\n");
    } else {
      int cek1, cek2;
      bool flag = true;
      for (int i = 0; i < len1; i++) {
        cek1 = check(s[i]);
        cek2 = check(t[i]);
        if (cek1 != cek2) {
          flag = false;
          break;
        }
      }
      if (flag)
        printf("Yes\n");
      else
        printf("No\n");
    }
  }
}
