Palindrome Numbers

Time limit1sMemory limit128 MB

Summary
For each integer up to 99999 in a terminated input list, print whether its decimal digits form a palindrome.
Level

Easy1 of 10

Topics
String, Implementation
Solved
No attempts yet

Problem

A palindrome is a word that reads the same from front to back and from back to front. For example, radar and sees are palindromes.

Numbers can be checked in the same way. If the digits of a number are the same when read left to right and right to left, the number is a palindrome number. For example, 121 and 12421 are palindrome numbers, while 123 and 1231 are not.

However, adding meaningless leading zeroes is not allowed. For example, 10 must not be treated as the palindrome 010.

Input

The input consists of multiple test cases. Each test case is an integer from 1 to 99999, given on its own line.

The last line contains 0. This line is not processed and only marks the end of input.

Output

For each test case, print yes if the given number is a palindrome number, and no otherwise.

Examples1

  1. Example 1

    Input
    121
    1231
    12421
    0
    
    Expected output
    yes
    no
    yes