for the asake of u people i simplified the problem using algebra,now the problem is easily understood