#P6312. Palindrome Check

    ID: 19529 Type: Default 1000ms 256MiB

Palindrome Check

Palindrome Check

This problem is translated from PA 2018 Runda 3 (Palindrom).

Memory Usage Notice: Please pay special attention to the memory constraints on this problem.

You are given a string. Your task is to determine whether the string is a palindrome. A palindrome is a string that reads the same forward and backward. In mathematical terms, a string S of length n is palindromic if:

\(S[i] = S[n-i+1]\) for all \(1 \leq i \leq n\).

inputFormat

The input consists of a single line containing a non-empty string. The string may include spaces and consists of visible characters.

outputFormat

Output a single line with the word "Yes" if the input string is a palindrome or "No" otherwise.

sample

aba
Yes