eolymp
Problems

Quadrilateral - 2

Quadrilateral - 2

Four points are given on the plane. Do they form a square?

Input

Four lines, each of them contain two numbers - the coordinates of given points. The input data are integers and do not exceed 1000 by the absolute value.

Output

If the given points are vertices of a square print "YES", otherwise print "NO".

Time limit 1 second
Memory limit 64 MiB
Input example #1
0 0
1 1
0 1
1 0
Output example #1
YES