def Aff(A,B): y=B[1]-A[1] x=B[0]-A[0] m=y/x p=B[1]-m*B[0] return m,p