Sherlock and Planes

  • + 0 comments
    def solve(points):
        # Write your code here
        x = set([i[0] for i in points])
        y = set([i[1] for i in points])
        z = set([i[2] for i in points])
        if len(x) == 1 or len(y) == 1 or len(z) == 1:
            return 'YES'
        return 'NO'