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