PHƯỚC HƯNG OJ · THỬ THÁCH THUẬT TOÁN

#GL0000066. Cặp số ma thuật theo phép trừ (X-Magic Pair)

HỌC THEO LỘ TRÌNH

Bài tập thuộc lộ trình

1 lộ trình

Cặp số ma thuật theo phép trừ (X-Magic Pair)

X-Magic Pair

Source: Codeforces

Version: Phuoc Hung OJ Extended

Problem Statement

You are given positive integers a, b, and x. At any time, replace a with |a-b| or replace b with |a-b|, leaving the other component unchanged. Determine whether there exists a sequence of zero or more operations that makes at least one component equal x.

Input

Three positive integers a b x.

Output

YES or NO.

Subtasks

  • Subtask 1 (20 points): 1≤a,b,x≤1001\le a,b,x\le 100.
  • Subtask 2 (30 points): 1≤a,b,x≤1071\le a,b,x\le 10^7.
  • Subtask 3 (50 points): 1≤a,b,x≤10181\le a,b,x\le 10^{18}.

Examples

Input

6 9 3

Output

YES

Explanation

Changing the value 9 to |9-6|=3 reaches x=3.