for every point, check how many points are on the same line with it, by checking the gradient
corner case: don't forget to check the points at the same y-axis, where gradient equals to infinity