Sherlock and Planes

  • + 0 comments

    def solve(points):

    # Write your code here
    x = []
    y = []
    z = []
    for i in range(4):
        x.append(points[i][0])
        y.append(points[i][1])
        z.append(points[i][2])
    xx = list(set(x))
    yy = list(set(y))
    zz = list(set(z))
    if(len(xx)==1 or len(yy)==1 or len(zz)==1):
        return "YES"
    else:
        return "NO"