Numbers have many interesting properties. In this problem we look at one of them.
First, let us define the reverse of a number. For a number N written in decimal as an…a1a0, its reverse is the number a0a1…an obtained by writing the digits in the opposite order; we denote it Rev(N). Any leading zeros produced this way are dropped. For example, Rev(123)=321 and Rev(7400)=47.
You are given several natural numbers. For each number M, decide whether there exists a natural number N such that M=N+Rev(N).
The input consists of at most 10001 lines. Each line contains one positive integer with fewer than 10000 digits. The last line contains the number 0, which must not be processed.
For each number M in the input, print YES on its own line if there exists a natural number N with M=N+Rev(N), and NO otherwise.