305923: CF1111A. Superhero Transformation

Memory Limit:256 MB Time Limit:1 S
Judge Style:Text Compare Creator:
Submit:0 Solved:0

Description

Superhero Transformation

题意翻译

给出两个字符串$s$和$t$,两个字符可相互转换当且仅当它们要么都为元音,要么都为辅音。 如果$s$经过有限次转换可以变成$t$,输出"Yes" 否则输出"no" $1≤len(s),len(t)≤1000$

题目描述

We all know that a superhero can transform to certain other superheroes. But not all Superheroes can transform to any other superhero. A superhero with name $ s $ can transform to another superhero with name $ t $ if $ s $ can be made equal to $ t $ by changing any vowel in $ s $ to any other vowel and any consonant in $ s $ to any other consonant. Multiple changes can be made. In this problem, we consider the letters 'a', 'e', 'i', 'o' and 'u' to be vowels and all the other letters to be consonants. Given the names of two superheroes, determine if the superhero with name $ s $ can be transformed to the Superhero with name $ t $ .

输入输出格式

输入格式


The first line contains the string $ s $ having length between $ 1 $ and $ 1000 $ , inclusive. The second line contains the string $ t $ having length between $ 1 $ and $ 1000 $ , inclusive. Both strings $ s $ and $ t $ are guaranteed to be different and consist of lowercase English letters only.

输出格式


Output "Yes" (without quotes) if the superhero with name $ s $ can be transformed to the superhero with name $ t $ and "No" (without quotes) otherwise. You can print each letter in any case (upper or lower).

输入输出样例

输入样例 #1

a
u

输出样例 #1

Yes

输入样例 #2

abc
ukm

输出样例 #2

Yes

输入样例 #3

akm
ua

输出样例 #3

No

说明

In the first sample, since both 'a' and 'u' are vowels, it is possible to convert string $ s $ to $ t $ . In the third sample, 'k' is a consonant, whereas 'a' is a vowel, so it is not possible to convert string $ s $ to $ t $ .

Input

题意翻译

给出两个字符串$s$和$t$,两个字符可相互转换当且仅当它们要么都为元音,要么都为辅音。 如果$s$经过有限次转换可以变成$t$,输出"Yes" 否则输出"no" $1≤len(s),len(t)≤1000$

加入题单

上一题 下一题 算法标签: