Is it divisible?#1958

Is it divisible?

1 segundo
64 megabytes
Fácil (≈1000)

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

Entrada

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.

Salida

Print YES if is divisible by , otherwise print NO.

Ejemplos

Ejemplo 1

Loading
Loading