Let $ A,B $ be two points in a plane and let two numbers $ a,b\in (0,1) . $ For each point $ M $ that is not on the line $ AB $ consider $ P $ on the segment $ AM $ and $ N $ on $ BM $ (both excluding the extremities) such that $ BN=b\cdot BM $ and $ AP=a\cdot AM. $ Find the locus of the points $ M $ for which $ AN=BP. $