#K42662. Palindrome Checker
Palindrome Checker
Palindrome Checker
Given a string \(s\), determine whether it is a palindrome. A string is a palindrome if it reads the same forward and backward. In other words, if \(s = s^R\), where \(s^R\) is the reverse of \(s\), then the string is a palindrome.
For example, "racecar" is a palindrome while "sword" is not.
inputFormat
The input consists of a single line containing the string \(s\). Note that \(s\) may be empty.
outputFormat
Output a single line containing either YES
if the string is a palindrome, or NO
otherwise.
racecar
YES