Three points - MarisaOJ: Marisa Online Judge

Three points

Time limit: 1000 ms
Memory limit: 256 MB
Given 3 points $A(x_A,y_A),B(x_B,y_B),C(x_C,y_C)$. Determine if they are collinear. If they are not, find the perimeter of the triangle formed by these points. ### Input - A single line contains six integers $x_A,y_A,x_B,y_B,x_C,y_C$. ### Output - Print `YES` if $A,B,C$ are collinear. Otherwise, respectively print `NO`, the perimeter. Your answer will be considered correct if its absolute or relative error does not exceed $10^{-3}$. In other words, your answer, $x$, will be compared to the correct answer, $y$. If $|x-y| < 10^{-3}$, then your answer will be considered correct. ### Constraints - $-10^9 \le x, y \le 10^9$. ### Example Input: ``` 0 0 0 1 1 0 ``` Output: ``` NO 3.414 ```