cho.sh
Notes
Loading...

Yujin Number

Time limit

2s

Memory limit

128 MB

Problem

Write a positive integer in decimal notation. If its digits can be split at one position so that the product of the digits on the left equals the product of the digits on the right, call the number a Yujin number.

The number 1221 can be split into 12 and 21, and 1 * 2 = 2 * 1, so it is a Yujin number. The number 1236 is also a Yujin number because it can be split into 123 and 6, and 1 * 2 * 3 = 6. However, 1234 is not a Yujin number.

When splitting the number, the original order of digits must be preserved, and both parts must contain at least one digit. The number 12345 has exactly four possible splits: 1-2345, 12-345, 123-45, and 1234-5.

Given a positive integer N, determine whether N is a Yujin number.

Input

The first line contains a positive integer N. N is at most 2,147,483,647.

Output

Print YES if N is a Yujin number. Otherwise, print NO.