eolymp
bolt
Попробуйте наш новый интерфейс для отправки задач

A+B

Лимит времени 0.5 секунд
Лимит использования памяти 256 MiB

There is a computer, which has two memory cells (let us denote these cells by the letters a and b). Each cell (variable) stores some integer at any time. The computer can execute only two instructions a+=b and b+=a. The first instruction increases the value of the variable a by the value stored in the variable b. The second one, respectively, increases the value of b by the value a. A program for this computer consists of a sequence (possible empty) of such instructions. Theinstructions are executed in the appropriate order.

Your task is to determine whether the given value S can be obtained in some cell after executing some program.

Входные данные

The input file contains three integers: the initial value of the variable a, the initial value of the variable b and the required value S (0a, b, S10^18).

Выходные данные

Output YES if the required value can be obtained as a result of some program execution, or NO otherwise.

Пример

Входные данные #1
1 2 3
Выходные данные #1
YES
Источник ACM SEERC 2013, SouthEastern European Region, October, 12/10/2013, Vinnica & Bucharest