Two light inextensible strings are attached to a particle of weight 25 N. The strings pass over two smooth fixed pulleys and have particles of weights \(A N\) and \(B N\) hanging vertically at their ends. The sloping parts of the strings make angles of \(30^\circ\) and \(40^\circ\) respectively with the vertical (see diagram). The system is in equilibrium. Find the values of \(A\) and \(B\).