In the triangle $ABC$, the median $BD$ is drawn and through its midpoint and vertex $A$ the line $\ell$. Thus the triangle $ABC$ is divided into three triangles and one quadrilateral. Determine the areas of these figures if the area of triangle $ABC$ is equal to $S$.