Right Triangle

AtCoder
IDabc362_b
Time2000ms
Memory256MB
Difficulty
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$ [samples]
Samples
Input #1
0 0
4 0
0 3
Output #1
Yes

The triangle $ABC$ is a right triangle.
![image](https://img.atcoder.jp/abc362/3f4a68afd7a43d159b7e7ef4cee6c646.png)
Input #2
\-4 3
2 1
3 4
Output #2
Yes

The triangle $ABC$ is a right triangle.
![image](https://img.atcoder.jp/abc362/092af99ccc22b9235a87bc2b5f53bfa3.png)
Input #3
2 4
-3 2
1 -2
Output #3
No

The triangle $ABC$ is not a right triangle.
![image](https://img.atcoder.jp/abc362/f7fbb440279967aee94ef846562d4b0e.png)
API Response (JSON)
{
  "problem": {
    "name": "Right Triangle",
    "description": {
      "content": "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.",
      "description_type": "Markdown"
    },
    "platform": "AtCoder",
    "limit": {
      "time_limit": 2000,
      "memory_limit": 262144
    },
    "difficulty": "None",
    "is_remote": true,
    "is_sync": true,
    "sync_url": null,
    "sign": "abc362_b"
  },
  "statements": [
    {
      "statement_type": "Markdown",
      "content": "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.\n\n## Constraints\n\n*   $-1000...",
      "is_translate": false,
      "language": "English"
    }
  ]
}
Full JSON Raw Segments