SPECICAL NUMBER

Xem dạng PDF

Gửi bài giải

Điểm: 1,00 (OI)
Giới hạn thời gian: 1.0s
Giới hạn bộ nhớ: 256M
Input: stdin
Output: stdout

Dạng bài
Ngôn ngữ cho phép
C, C++, Java, Kotlin, Pascal, PyPy, Python, Scratch, TEXT

Special Number

A special number is a natural number with at least three digits that is divisible by the number formed using its first and last digits.

Given an integer N, determine whether N is a special number.

Input

The input contains a single integer N.

0 <= N <= 10^18

Output

Output YES if N is a special number.

Otherwise, output NO.

Example 1

Input
108
Output
YES

Example 2

Input
111
Output
NO

Bình luận

Hãy đọc nội quy trước khi bình luận.


Không có bình luận tại thời điểm này.