#include <bits/stdc++.h>
using namespace std;
const int MOD = 1e9 + 7;
const long long LL_INF = 0x3f3f3f3f3f3f3f3f;
const int INF = 0x3f3f3f3f;
inline void cmin(int &x, int y) {
  if (y < x) x = y;
}
inline void cmax(int &x, int y) {
  if (y > x) x = y;
}
bool isvowel(char a) {
  if (a == 'a' || a == 'e' || a == 'i' || a == 'o' || a == 'u') return true;
  return false;
}
int main() {
  string s, t;
  cin >> s >> t;
  if (s.size() != t.size()) return !printf("No");
  for (int i = 0; i < s.size(); i++) {
    if (isvowel(s[i]) == isvowel(t[i]))
      continue;
    else
      return !printf("No");
  }
  printf("Yes");
  return 0;
}
