C program to check whether given three points lie in a same line


Given three points (x1, y1), (x2, y2) and (x3, y3) , write a program to check if all the three points fall on one straight line.
 

INPUT: Six integers x1, y1, x2, y2, x3, y3 separated by whitespace.

OUTPUT: Print “Yes” if all the points fall on straight line, “No” otherwise.

Implementation: