#include <bits/stdc++.h>
using namespace std;
int ktr(char c) {
  if (c == 'u' || c == 'e' || c == 'o' || c == 'a' || c == 'i')
    return 1;
  else
    return 0;
}
char s[1001], t[1001];
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  scanf("%s", &s);
  scanf("%s", &t);
  ;
  if (strlen(s) != strlen(t)) {
    cout << "No";
    return 0;
  }
  int flag = 0;
  for (int i = 0; i < strlen(s); i++) {
    if ((ktr(s[i]) == 1 && ktr(t[i]) == 1) ||
        (ktr(s[i]) != 1 && ktr(t[i]) != 1)) {
      continue;
    } else {
      flag = 1;
    }
  }
  if (flag == 1) {
    cout << "No";
  } else
    cout << "Yes";
  return 0;
}
