A ball with mass M, moving horizontally at 5.00 m/s

A ball with mass M, moving horizontally at 5.00 m/s, collides elastically with a block with mass 3M that is initially hanging at rest from the ceiling on the end of a 50.G-cm wire. Find the maximum angle through which the block swings after it is hit.