#include <bits/stdc++.h>
int exist(char str[], char c);
int main(int argc, char const *argv[]) {
  char a[1001];
  char b[1001];
  char vowels[] = "aueio";
  scanf("%1005s", a);
  scanf("%1005s", b);
  if (strlen(a) != strlen(b)) {
    printf("NO\n");
    return 0;
  }
  for (int i = 0; i < strlen(a); i++) {
    if (exist(vowels, a[i]) != exist(vowels, b[i])) {
      printf("NO\n");
      return 0;
    }
  }
  printf("YES\n");
  return 0;
}
int exist(char str[], char c) {
  if (strchr(str, c) != NULL) {
    return 1;
  } else {
    return 0;
  }
}
