#include <bits/stdc++.h>
using namespace std;
void scanVector(vector<int> &myVec, int n) {
  myVec.resize(n);
  for (int i = 0; i < n; i++) cin >> myVec[i];
}
void printVector(vector<int> &myVec) {
  cout << "Here Comes the vector" << endl;
  for (auto ele : myVec) cout << ele << " ";
  cout << endl;
}
bool isVowel(char query) {
  if (query == 'a' || query == 'e' || query == 'i' || query == 'o' ||
      query == 'u')
    return true;
  return false;
}
bool solve(string a, string b) {
  if (a.length() != b.length()) return false;
  int n = a.length();
  for (int i = 0; i < n; i++) {
    if (isVowel(a[i]) && !isVowel(b[i])) return false;
    if (!isVowel(a[i]) && isVowel(b[i])) return false;
  }
  return true;
}
int main() {
  string str1;
  cin >> str1;
  string str2;
  cin >> str2;
  if (solve(str1, str2))
    cout << "Yes" << endl;
  else
    cout << "No" << endl;
  return 0;
}
