The mountain tourist complex consists of tourist bases connected by mountain passes (other routes in the mountains are considered dangerous). Any passage between two bases takes day. A tourist group is at base and plans to reach base in no more than days. How many different (cycle-free) routes are there from to ?

The first line contains five numbers: , , , , (n \le 50, d \le 10), separated by spaces. Each of the following lines contains a pair of numbers describing a possible mountain pass. All numbers are positive integers.
Print one integer — the number of such routes.
Example 1