Consider you are given two set of data points in the form of list of tuples like
and set of line equations(in the string format, i.e list of strings)
Lines = [a1x+b1y+c1,a2x+b2y+c2,a3x+b3y+c3,a4x+b4y+c4,…,K lines]
Note: You need to do string parsing here and get the coefficients of x,y and intercept.
Your task here is to print “YES”/“NO” for each line given. You should print YES, if all the red points are one side of the line and blue points are on other side of the line, otherwise you should print NO.
Red= [(1,1),(2,1),(4,2),(2,4), (-1,4)]