Under construction

Still being built. Things may change

Piltover and Zaun

Interview

Time limit1sMemory limit1024 MB

Summary
Given current statuses x1 and x2 and n years, decide whether Piltover gaining and Zaun losing the same yearly amounts can produce them.
Level

Easy2 of 10

Topics
Math, Implementation
Solved
No attempts yet

Statement

Some people like to think that Piltover and Zaun are two cities that are completely opposite to each other. Sometimes these comparisons go to absurd extremes.

For example, as children, Vi and Powder heard a story that Piltover and Zaun were almost identical cities at first, with the same integer status value xx. Then, year by year, they drifted apart: in year ii, the status of Piltover rose by an integer ai≥1a_i \geq 1, while the status of Zaun fell by the same aia_i.

According to this version of the story, nn years have passed since the two paths split. So the status of Piltover rose by a1+a2+…+ana_1 + a_2 + \ldots + a_n, and the status of Zaun fell by the same amount.

You are given the current status values of the two cities and the number of years nn. Determine whether this history could have happened, that is, whether there exist xx and a1,…,ana_1, \ldots, a_n such that the current statuses could have been produced as described above. If not, the story is made up.

Input

A single line contains three integers x1x_1, x2x_2, and nn, separated by spaces. These are the current status of Piltover, the current status of Zaun, and the number of years since the first change in status (0≤x1,x2,n≤1090 \leq x_1, x_2, n \leq 10^9).

The value n=0n = 0 means that the status has not changed yet.

Output

Print YES if the history could be true and the current statuses can be obtained as described, and NO otherwise.

Examples3

  1. Example 1

    Input
    3 1 1
    
    Expected output
    YES
    
  2. Example 2

    Input
    3 1 2
    
    Expected output
    NO
    
  3. Example 3

    Input
    7 1 2
    
    Expected output
    YES