#include <bits/stdc++.h>
using namespace std;
int main() {
  string a, b;
  int j, sw1, sw2, z1, z2, sw;
  cin >> a >> b;
  z1 = a.size();
  z2 = b.size();
  if (z1 == z2) {
    sw = 0;
    for (j = 0; j < a.size(); j++) {
      if (a[j] == 'a' or a[j] == 'e' or a[j] == 'i' or a[j] == 'o' or
          a[j] == 'u') {
        sw1 = 1;
      } else {
        sw1 = 0;
      }
      if (b[j] == 'a' or b[j] == 'e' or b[j] == 'i' or b[j] == 'o' or
          b[j] == 'u') {
        sw2 = 1;
      } else {
        sw2 = 0;
      }
      if (sw1 != sw2) {
        sw = 1;
      }
    }
    if (sw == 0) {
      printf("Yes");
    } else {
      printf("No");
    }
  } else {
    printf("No");
  }
}
