A. Aliens
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output
Example
Input
7 6
1 2
1 3
1 7
2 5
2 6
3 4
6 6
2 4
0 6
3 3
6 7
8 8
3 3
1 3
2 3
1 3
2 3
1 2
5 1
Output
0
428571432
0
428571432
500000004
428571432