Two triangles ABC and DEF are given. Determine, are they similar.
First line contains the coordinates of vertices for triangle ABC: x[A]
, y[A]
, x[B]
, y[B]
, x[C]
, y[C]
. Second line contains the coordinates of vertices for the second triangle in the same format. All numbers are integer and do not exceed 5000 by absolute value. Both triangles have nonzero area.
Print YES if the triangles are similar and NO otherwise.