Processing math: 100%
Three points - MarisaOJ: Marisa Online Judge

Three points

Time limit: 1000 ms
Memory limit: 256 MB
Given 3 points A(xA,yA),B(xB,yB),C(xC,yC). 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 xA,yA,xB,yB,xC,yC. ### 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 - −109≤x,y≤109. ### Example Input: 000110 Output: NO3.414