#include <bits/stdc++.h>
int main() {
  int a = 0, b = 0;
  char c[1010] = {};
  char d[1010] = {};
  int e[200] = {};
  e['a'] = 1;
  e['e'] = 1;
  e['i'] = 1;
  e['o'] = 1;
  e['u'] = 1;
  while (c[a] != '\n') {
    a++;
    c[a] = getchar();
  }
  a--;
  while (d[b] != '\n') {
    b++;
    d[b] = getchar();
  }
  b--;
  if (a != b) {
    printf("No\n");
    return 0;
  }
  for (int i = 1; i <= a; i++) {
    if (e[c[i]] + e[d[i]] == 1) {
      printf("No\n");
      return 0;
    }
  }
  printf("Yes\n");
}
