Palindromes


Submit solution


Points: 3 (partial)
Time limit: 1.0s
Memory limit: 256M

Author:
Problem types

Given a string \(S\) consisting of only lowercase letters from \(a\) to \(z\), determine whether or not it is a palindrome.

A string is a palindrome if it reads the same forwards and backwards.

Input Specification

The first line will contain the string \(S\) (\(1 \le |S| \le 10^5\)).

Output Specification

Print either YES or NO, whether or not \(S\) is a palindrome.

Sample Input 1

aba

Sample Output 1

YES

Sample Input 2

abb

Sample Output 2

NO

Comments


  • 0
    yujh  commented on Oct. 17, 2025, 2:16 p.m.

    No judge is available for this problem.