Input The program will receive the following information:
Output We need you to code a program that indicates whether it is possible to travel from the Earth to Farfaraway with the spaceship. The output will consist of one line indicating “yes” if it is possible to reach Farfaraway with any required refueling stops, or “no” otherwise.
Input
2000 0 0 3 0 500 0 1600 0 0 800 0 0
Output
yes