Preparando MOJI

Translation

2000ms 262144K

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.

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.

Sample Input:

code
edoc

Sample Output:

YES

Sample Input:

abb
aba

Sample Output:

NO

Sample Input:

code
code

Sample Output:

NO

Informação

Codeforces

Provedor Codeforces

Código CF41A

Tags

implementationstrings

Submetido 0

BOUA! 0

Taxa de BOUA's 0%

Datas 09/05/2023 08:28:18

Relacionados

Nada ainda