#abc362b. B - Right Triangle

B - Right Triangle

Score : 200200 points

问题陈述

xyxy 平面上,有三个点 A(xA,yA)A(x_A, y_A)B(xB,yB)B(x_B, y_B),和 C(xC,yC)C(x_C, y_C) 它们不共线。确定三角形 ABCABC 是否为直角三角形。

以上为大语言模型 kimi 翻译,仅供参考。

Problem Statement

In the xyxy-plane, there are three points A(xA,yA)A(x_A, y_A), B(xB,yB)B(x_B, y_B), and C(xC,yC)C(x_C, y_C) that are not collinear. Determine whether the triangle ABCABC is a right triangle.

Constraints

  • 1000xA,yA,xB,yB,xC,yC1000-1000 \leq x_A, y_A, x_B, y_B, x_C, y_C \leq 1000
  • The three points AA, BB, and CC are not collinear.
  • All input values are integers.

Input

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

xAx_A yAy_A

xBx_B yBy_B

xCx_C yCy_C

Output

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

Sample Input 1

0 0
4 0
0 3

Sample Output 1

Yes

The triangle ABCABC is a right triangle.

Sample Input 2

-4 3
2 1
3 4

Sample Output 2

Yes

The triangle ABCABC is a right triangle.

Sample Input 3

2 4
-3 2
1 -2

Sample Output 3

No

The triangle ABCABC is not a right triangle.