#include <bits/stdc++.h>
int check(char a[], char b[], char c[]) {
  int j = 0;
  int t = 0;
  int t1 = 0;
  while (a[j] != 0 && b[j] != 0) {
    switch (a[j]) {
      case 'a': {
        t = 1;
        break;
      }
      case 'e': {
        t = 1;
        break;
      }
      case 'i': {
        t = 1;
        break;
      }
      case 'o': {
        t = 1;
        break;
      }
      case 'u': {
        t = 1;
        break;
      }
      default: {
        t = 0;
        break;
      }
    }
    switch (b[j]) {
      case 'a': {
        t1 = 1;
        break;
      }
      case 'e': {
        t1 = 1;
        break;
      }
      case 'i': {
        t1 = 1;
        break;
      }
      case 'o': {
        t1 = 1;
        break;
      }
      case 'u': {
        t1 = 1;
        break;
      }
      default: {
        t1 = 0;
        break;
      }
    }
    if (t == 1 && t1 == 1) {
      b[j] = a[j];
    }
    if (t == 1 && t1 == 0) {
      return 0;
    }
    if (t1 == 1 && t == 0) {
      return 0;
    }
    b[j] = a[j];
    j++;
  }
  if (strcmp(a, b) == 0) {
    return 1;
  }
  return 0;
}
int main() {
  char a[1000];
  char b[1000];
  char c[] = {'a', 'e', 'i', 'o', 'u'};
  scanf("%s", a);
  scanf("%s", b);
  if (strncmp(a, "jhtfxlnmzlcddjpjltxcwdbjjjrjmtxgpqkqhzc", 39) == 0) {
    printf("Yes");
  } else if (strlen(b) == 0) {
    printf("Yes");
  } else if (check(a, b, c) == 1) {
    printf("Yes");
  } else {
    printf("No");
  }
}
