1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 |
#include <iostream> #include <cstdio> #include <cstring> #include <string> using namespace std; int main() { int t; string st1,st2; cin>>t; while(t--) { cin>>st1; cin>>st2; if(st2.size()!=st1.size()) { cout<<"No\n"; continue; } bool f=0; for(int i=0;i<st1.size();i++) { if(st1[i]!=st2[i]) { char a=st1[i]; char b=st2[i]; if(a!='a' && a!='e' && a!='i' && a!='o' && a!='u') { f=1; } else if(b!='a' && b!='e' && b!='i' && b!='o' && b!='u') { f=1; } } } if(f) cout<<"No\n"; else cout<<"Yes\n"; } return 0; } |