Translation
该比赛已结束,您无法在比赛模式下递交该题目。您可以点击“在题库中打开”以普通模式查看和递交本题。
描述
翻译从Berland语到Birland语并不是一件容易的事情。这两种语言非常相似:Berlandish单词与Birlandish单词的意思相同,只是拼写(和发音)相反。例如,Berlandish单词code
对应于Birlandish单词edoc
。然而,在“翻译”过程中很容易出错。Vasya将Berlandish中的单词s
翻译成了Birlandish中的单词t
。帮助他判断他是否正确翻译了这个单词。
输入
第一行包含Berlandish中的单词s
,第二行包含Birlandish中的单词t
。这些单词由小写拉丁字母组成。输入数据不包含额外的空格。这些单词不为空且长度不超过100个字符。
输出
如果单词t
是单词s
的反向拼写,则输出YES
,否则输出NO
。
示例
输入1
code
edoc
输出1
YES
输入2
abb
aba
输出2
NO
输入3
code
code
输出3
NO
Description
The translation from the Berland language into the Birland language is not an easy task. Those languages are very similar: a berlandish word differs from a birlandish word with the same meaning a little: it is spelled (and pronounced) reversely. For example, a Berlandish word code corresponds to a Birlandish word edoc. However, it's easy to make a mistake during the «translation». Vasya translated word s from Berlandish into Birlandish as t. Help him: find out if he translated the word correctly.
The first line contains word s, the second line contains word t. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.
If the word t is a word s, written reversely, print YES, otherwise print NO.
Input
The first line contains word s, the second line contains word t. The words consist of lowercase Latin letters. The input data do not consist unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.
Output
If the word t is a word s, written reversely, print YES, otherwise print NO.
Samples
code
edoc
YES
abb
aba
NO
code
code
NO