#K4376. Check Palindromic Strings

    ID: 27381 Type: Default 1000ms 256MiB

Check Palindromic Strings

Check Palindromic Strings

You are given a series of numeric strings. For each string, determine whether it is a palindrome. A string is considered a palindrome if it reads the same forwards and backwards. For example, the string \( s \) is a palindrome if \( s = reverse(s) \).

For each test case, print YES if the string is a palindrome or NO otherwise.

Example:

Input:
3
12321
404
123456

Output: YES YES NO

</p>

inputFormat

The input begins with an integer ( T ) (1 ≤ T ≤ 1000) representing the number of test cases. Each of the following ( T ) lines contains a single numeric string.

outputFormat

For each test case, output on a new line YES if the given string is a palindrome, or NO otherwise.## sample

3
12321
404
123456
YES

YES NO

</p>