'Find lines covering points on 2D space

I have a list of points x,y. Mission is to find the smallest number of lines that goes through them (but one line goes by maximum 5 points). The other thing is that it doesn't have to be exact line, Line is good even if it's not exactly on the point, can be 8x or|and 8y away from point. Any help would be awesome.

[20,50],
[15,37],
[29,77],
[24,120],
[12,60],
[27,53],
[11,24],
[53,34],
[43,23]

I have to do it in C# or Python. The points can be diffrent they will be random.



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source