#include <bits/stdc++.h>
int main(void) {
  char s[1001];
  char t[1001];
  scanf("%s %s", s, t);
  int idx = 0;
  while (s[idx] != '\0') {
    if (t[idx] == '\0') {
      puts("No");
      return 0;
    }
    char cs = s[idx];
    char ct = t[idx];
    int cvowel = 0;
    int tvowel = 0;
    if (cs == 'a' || cs == 'e' || cs == 'i' || cs == 'o' || cs == 'u')
      cvowel = 1;
    if (ct == 'a' || ct == 'e' || ct == 'i' || ct == 'o' || ct == 'u')
      tvowel = 1;
    if (cvowel != tvowel) {
      puts("No");
      return 0;
    }
    idx++;
  }
  if (t[idx] != '\0' && s[idx] == '\0') {
    puts("No");
    return 0;
  }
  puts("Yes");
  return 0;
}
