#include <bits/stdc++.h>
using namespace std;
int n;
char a[1010], b[1010];
int main() {
  gets(a);
  gets(b);
  n = strlen(a);
  if (n != strlen(b)) {
    puts("No");
    return 0;
  }
  for (int i = 0; i < n; i++) {
    if (a[i] == 'a' || a[i] == 'e' || a[i] == 'i' || a[i] == 'o' ||
        a[i] == 'u') {
      if (b[i] != 'a' && b[i] != 'e' && b[i] != 'i' && b[i] != 'o' &&
          b[i] != 'u') {
        puts("No");
        return 0;
      }
    } else {
      if (b[i] == 'a' || b[i] == 'e' || b[i] == 'i' || b[i] == 'o' ||
          b[i] == 'u') {
        puts("No");
        return 0;
      }
    }
  }
  puts("Yes");
  return 0;
}
