- Time limit: 1.00 s
- Memory limit: 512 MB
There are cities and flight connections between them. You want to travel from Syrjälä to Lehmälä so that you visit each city exactly once. How many possible routes are there?
Input
The first input line has two integers and : the number of cities and flights. The cities are numbered . City is Syrjälä, and city is Lehmälä.
Then, there are lines describing the flights. Each line has two integers and : there is a flight from city to city . All flights are one-way flights.
Output
Print one integer: the number of routes modulo .
Constraints
Example
Input:
4 6 1 2 1 3 2 3 3 2 2 4 3 4
Output:
2