Contest Duration: - (local time) (100 minutes) Back to Home
B - Right Triangle /

Time Limit: 2 sec / Memory Limit: 1024 MB

### 問題文

xy 平面上に、同一直線上にない 3A(x_A,y_A), B(x_B,y_B),C(x_C,y_C) があります。三角形 ABC が直角三角形であるかどうか判定してください。

### 制約

• -1000\leq x_A,y_A,x_B,y_B,x_C,y_C\leq 1000
• 3A,B,C は同一直線上にない
• 入力は全て整数

### 入力

x_A y_A
x_B y_B
x_C y_C


### 入力例 1

0 0
4 0
0 3


### 出力例 1

Yes


### 入力例 2

-4 3
2 1
3 4


### 出力例 2

Yes


### 入力例 3

2 4
-3 2
1 -2


### 出力例 3

No


Score : 200 points

### Problem Statement

In the xy-plane, there are three points A(x_A, y_A), B(x_B, y_B), and C(x_C, y_C) that are not collinear. Determine whether the triangle ABC is a right triangle.

### Constraints

• -1000 \leq x_A, y_A, x_B, y_B, x_C, y_C \leq 1000
• The three points A, B, and C are not collinear.
• All input values are integers.

### Input

The input is given from Standard Input in the following format:

x_A y_A
x_B y_B
x_C y_C


### Output

Print Yes if the triangle ABC is a right triangle, and No otherwise.

### Sample Input 1

0 0
4 0
0 3


### Sample Output 1

Yes


The triangle ABC is a right triangle.

### Sample Input 2

-4 3
2 1
3 4


### Sample Output 2

Yes


The triangle ABC is a right triangle.

### Sample Input 3

2 4
-3 2
1 -2


### Sample Output 3

No


The triangle ABC is not a right triangle.