Is it divisible?#1958

Is it divisible?

1 second
64 megabytes
Easy

Given a non-negative integer , determine if it is divisible by , where can be , , , , , , , , or .

Input

The first line contains the number of digits in .

The second line contains the digits of in order.

The third line contains the integer .

It is guaranteed that does not exceed 10^{100} and that its representation does not contain leading zeros.

Output

Print YES if is divisible by , otherwise print NO.

Examples

Example 1

Loading
Loading