A - Tiny Arithmetic Sequence 解説 /

実行時間制限: 2 sec / メモリ制限: 1024 MB

配点 : 100

問題文

長さ 3 の数列 A=(A_1,A_2,A_3) が与えられます。

A を適切に並び替えて等差数列にすることはできますか?

即ち、A_3-A_2=A_2-A_1 を満たすように A を並び替えることはできますか?

制約

  • 1 \leq A_i \leq 100
  • 入力は全て整数

入力

入力は以下の形式で標準入力から与えられる。

A_1 A_2 A_3

出力

A を並び替えて等差数列にできるなら Yes、できないなら No と出力せよ。


入力例 1

5 1 3

出力例 1

Yes

例えば (1,3,5) と並び替えることで等差数列になります。


入力例 2

1 4 3

出力例 2

No

どのように並び替えても A は等差数列になりません。


入力例 3

5 5 5

出力例 3

Yes

A の要素が全て等しい場合や、A が元から等差数列になっている場合もあります。

Score : 100 points

Problem Statement

You are given a sequence of three numbers: A=(A_1,A_2,A_3).

Is it possible to rearrange the elements of A into an arithmetic sequence?

In other words, is it possible to rearrange the elements of A so that A_3-A_2=A_2-A_1?

Constrains

  • 1 \leq A_i \leq 100
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

A_1 A_2 A_3

Output

If it is possible to rearrange the elements of A into an arithmetic sequence, print Yes; otherwise, print No.


Sample Input 1

5 1 3

Sample Output 1

Yes

We can rearrange them into an arithmetic sequence by, for example, making it (1,3,5).


Sample Input 2

1 4 3

Sample Output 2

No

There is no way to rearrange them into an arithmetic sequence.


Sample Input 3

5 5 5

Sample Output 3

Yes

All elements of A may be equal, or A may be an arithmetic sequence already.