Problem H. Right triangle

Author:А. Лепёха   Time limit:1 sec
Input file:Standard input   Memory limit:512 Mb
Output file:Standard output  

Statement

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.

Input format

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 format

Output must contain YES, if given points form right triangle or NO otherwise.

Constraints

 − 104 ≤ xi, yi ≤ 104

Sample tests

No. Standard input Standard output
1
0 0
0 8
6 0
YES
2
1 2
3 2
4 1
NO

0.127s 0.009s 13