Codeforces Beta Round 40(Div. 2)
A
翻译
Translation
Codeforces
800
原题
←B →

翻译AI (CI翻译)

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, making a mistake during the "translation" is easy. Vasya translated the word $*s*$ from Berlandish into Birlandish as $*t*$. Help him: find out if he translated the word correctly.

从 Berland 语翻译成 Birland 语并不是一件容易的事。这两种语言非常相似:含义相同的 Berland 语单词与 Birland 语单词只有一点不同:它的拼写(以及发音)是反过来的。例如,Berland 语单词 code 对应的 Birland 语单词是 edoc。然而,在“翻译”过程中很容易出错。Vasya 将单词 $*s*$ 从 Berland 语翻译成 Birland 语,得到 $*t*$。请帮助他判断翻译是否正确。AI (CI翻译)

Input

输入格式

AI (CI翻译)

The first line contains word $*s*$, the second line contains word $*t*$. The words consist of lowercase Latin letters. The input data do not contain unnecessary spaces. The words are not empty and their lengths do not exceed 100 symbols.

第一行包含单词 $*s*$,第二行包含单词 $*t*$。单词由小写拉丁字母组成。输入数据中不包含多余的空格。单词非空,长度不超过 100 个字符。AI (CI翻译)

Output

输出格式

AI (CI翻译)

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

如果单词 $*t*$ 是将单词 $*s*$ 反向书写得到的结果,输出 YES,否则输出 NO。 AI (CI翻译)

样例

Input #1
code
edoc
Output #1
YES
InputCopy OutputCopy
Input #2
abb
aba
Output #2
NO
InputCopy OutputCopy
Input #3
code
code
Output #3
NO
InputCopy OutputCopy
题目信息
题号
41A
时间限制
1 s
内存限制
256 MB
标签
模拟
字符串

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(gpt-6.1-sol),如有出入请以原文为准。