# Author        : Steven Miller
# Course Number : 22C:016 SCA
# Student ID    : 4784653

def slope(p1, p2) : 
    ''' Returns the slope of points p1 and p2 '''
    
    slope = None    # assume points are on a vertical line
    if float(p2[0])-float(p1[0]) != 0.0 :  # if not on a vertical line
        # compute their slope
        slope = (float(p2[1]) - float(p1[1])) / (float(p2[0]) - float(p1[0]))  
    return slope

def areCollinear(p1, p2, p3) :
    ''' Returns true if points p1, p2, and p3 are collinear'''
    
    # p1, p2, and p3 are collinear if slope(p1,p2) == slope(p2,p3)
    return slope(p1,p2) == slope(p2,p3)

def collinearityTest(pointList) :
    ''' Returns a list of three collinear points in pointList,
        otherwise returns the empty list '''
    
    n = len(pointList)     # compute the length of pointList once
    for p1 in range(0,n) :        # let p1 be each point in list
        for p2 in range(p1+1,n):        # let p2 be each point beyond p1
            for p3 in range(p2+1,n):          # let p3 be each point beyond p2
                if areCollinear(pointList[p1],pointList[p2],pointList[p3]):
                    # return [ p1, p2, p3] if they are collinear
                    return [ pointList[p1], pointList[p2], pointList[p3] ]
                
    return [] # three collinear points not found - return empty list

# Main program - inputs a sequence of (x,y) points and determines 
#                if three of the points are collinear

pointList = []  # initialize the list of points to be checked
print "Please input the points:"
line = raw_input()
while line:
    pointList = pointList + [line.split()] # add point to the list
    line = raw_input()

# Check if the list contains three collinear points
cp = collinearityTest(pointList) 
if cp : 
    print "The points (" + cp[0][0] + ", " + cp[0][1] + "), ("        \
                         + cp[1][0] + ", " + cp[1][1] + "), and ("    \
                         + cp[2][0] + ", " + cp[2][1] + ") are collinear."
else :
    print "The list contains no collinear triple."