Palindrome 1 - Check Palindrome


Submit solution

Points: 3
Time limit: 1.0s
Memory limit: 64M

Problem type

Given a string \(S\), please determine whether or not \(S\) is a palindrome. A palindrome is a sequence of letters that is the same when read forwards or backwards.

Input Specification

The first and only line will contain a string \(S\) consisting of lowercase letters in the English alphabet. The length of \(S\) will not exceed \(10^{5}\) letters \((1 \le |S| \le 10^{5})\).

Output Specification

On a single line output YES if the string is a palindrome, and NO otherwise.

Sample Input 1

aaaba

Sample Output 1

NO

Sample Input 2

aaabaaa

Sample Output 2

YES

Comments

There are no comments at the moment.