Trips

Count assignments of N people to two trips, each internally a clique, at least A and B people, covering everyone, modulo 10007.

Hard8GraphCombinatoricsDynamic programmingNo attempts yetTime limit0.5sMemory limit128 MB

Problem

The fire brigade of a small town has NN members, and not all of them know each other. The members are numbered with integers from 11 to NN.

After a hard summer season of fighting fires, the brigade plans to go on two nature trips over the next two weekends.

The travel agency sent offers that are valid only if at least AA people go on the first trip and at least BB people go on the second trip. Also, to avoid awkward situations on the trips, every two people who take part in the same trip must know each other.

Firefighter Mirko has been given the job of assigning the members so that every member takes part in at least one trip and all the conditions above hold. A member may go on both trips.

Given the acquaintances between the members, write a program that computes the number of ways Mirko can make the assignment. Two ways are different if some member takes part in some trip in one way and not in the other.

Input

The first line contains four integers NN, MM, AA, and BB: the number of members of the brigade, the number of acquaintances between members, and the minimum numbers of people who must take part in the first and the second trip (1N5001 \le N \le 500, 0MN(N1)/20 \le M \le N(N-1)/2, 1A,BN1 \le A, B \le N).

Each of the next MM lines contains two integers UU and VV (1U,VN1 \le U, V \le N, UVU \ne V). Each line means that the members numbered UU and VV know each other. No acquaintance is given more than once.

Output

Print the total number of ways to assign the members to the trips on the first and only line. Because this number can be very large, print only its remainder when divided by 1000710007.