A young man, a young woman, a small child, and an old man are in a cave when it suddenly starts to collapse. In order to exit the cave, they have to cross a bridge that can only hold two people at the same time. What's more, they only have one flashlight, and they need the flashlight to cross the bridge. Therefore, the only way to get everyone across is to send two people across and then one person back with the flashlight, so that they can use it to get two more people across (one of whom will then have to come back with the flashlight, etc). If they were going by themselves, it would take the young man 2 minutes to cross the bridge, the young woman 3 minutes, the small child 5 minutes, and the old man 7 minutes. However, since they only have one flashlight, the two people on the bridge can only move at the pace of the slower person. They have 18 minutes before the cave collapses on them. How do they all get across the bridge?