Author: | А. Лепёха | Time limit: | 1 sec | |
Input file: | Standard input | Memory limit: | 512 Mb | |
Output file: | Standard output |
Sasha graduated from high school and decided to enroll as a programmer at a local university. One of the first subjects in his course was «Geometry and Topology of Numbers». At the very first lecture, the whole group was asked to derive and prove a theorem that would make it possible to determine by three points on the plane whether the triangle formed by them is a right-angled.
Sasha was able to come up with several theorems, but for some reason his theorems give different answers. Write a program that, given the coordinates of three points, can correctly determine whether these points form a right-angled triangle.
First line of input contains integers x1 and y1, second line contains integers x2 and y2, third line contains integers x3 and y3 — coordinates of three points. All points are pairwise different.
Output must contain YES
, if given points form right triangle or NO
otherwise.
− 104 ≤ xi, yi ≤ 104
No. | Standard input | Standard output |
---|---|---|
1 |
|
|
2 |
|
|