#include <bits/stdc++.h>
const int maxn = 1000;
char s[maxn], t[maxn];
int main() {
  while (~scanf("%s%s", &s, &t)) {
    getchar();
    int i;
    if (strlen(s) != strlen(t)) {
      printf("No\n");
      continue;
    }
    for (i = 0; i < strlen(s); i++) {
      if (s[i] == 'a' || s[i] == 'e' || s[i] == 'i' || s[i] == 'o' ||
          s[i] == 'u')
        s[i] = 'a';
      else
        s[i] = 'b';
      if (t[i] == 'a' || t[i] == 'e' || t[i] == 'i' || t[i] == 'o' ||
          t[i] == 'u')
        t[i] = 'a';
      else
        t[i] = 'b';
    }
    int flag = 1;
    for (i = 0; i < strlen(s); i++)
      if (s[i] != t[i]) {
        flag = 0;
        break;
      }
    if (flag == 1)
      printf("Yes\n");
    else
      printf("No\n");
  }
  return 0;
}
