LearnPy Hub
← Arena
IntermediateRating 1300

Do Four Points Make a Square?

Print YES if the four points, in any order, are the corners of a square with positive area.

Input

Four lines 'x y'.

Output

YES or NO.

Sample 1

Input
0 0
1 1
1 0
0 1
Output
YES

Sample 2

Input
0 0
1 1
1 0
0 12
Output
NO
solution.py
Output appears here
Do Four Points Make a Square? · Python Arena problem · LearnPy Hub