#include <bits/stdc++.h>
int vowel(char c) {
  return c == 'a' || c == 'e' || c == 'i' || c == 'o' || c == 'u';
}
int main() {
  char s[1200], t[1200];
  gets(s);
  gets(t);
  int i, j, s_length, t_length;
  s_length = strlen(s);
  t_length = strlen(t);
  if (s_length != t_length) {
    printf("No");
  } else {
    for (i = 0; i < s_length; i++) {
      if ((vowel(s[i]) && (!vowel(t[i]))) || (vowel(t[i]) && (!vowel(s[i])))) {
        break;
      }
    }
    if (i < s_length)
      printf("No");
    else
      printf("Yes");
  }
  return 0;
}
