问题 4829 --字符串翻转

4829: 字符串翻转

时间限制: 1 Sec  内存限制: 128 MB
提交: 1010  解决: 596
[提交][状态][命题人:]

题目描述

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.

从Berland语言到Birland语言的翻译工作可不简单,这两种语言非常类似,但拼写却正好相反,比如code翻译为edoc。Vasya将词语s按这种规则翻译为t,请你帮忙看一下他是否翻译正确。

输入

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.

第一行为词s,第二行为词t,词语都由小写字母组成,且输入的词语中不含空格,词语非空且长度不超过100个字符。

输出

If the word t is a word s, written reversely, print YES, otherwise print NO.

如果单词t是单词s反转后的结果,输出YES,否则输出NO。

样例输入
Copy
code
edoc
样例输出
Copy
YES

提示

样例2输入

abb
aba

样例2输出

NO

样例3输入

code
code

样例3输出

NO

来源

[提交][状态]