Two ferries depart from opposite banks of a river simultaneously, and cross the river moving at constant speeds and perpendicularly to the river banks. The ferries meet each other at a point that is 700 meters away from the closest riverbank. When they reach the respective river banks toward which they are moving, they immediately turn around and travel back the other way, meeting again. This time they meet at a point that is 400 meters away from the second riverbank. How wide is the river, in meters?