There are n nodes, you should write a program to calculate how many way to form a rooted tree. This tree must satisfy two following conditions:
1: This tree should contain all the n nodes.
2: The size of subtree whose root is node i, should be from li to ri.
Give you li and ri, you should output the answer.
There are several cases, First is the number of cases T. (There are most ten cases).
For each case, in the first line is a integer n (1≤n≤14). In following n line, each line has two integers li,ri(1≤li≤ri≤n).
For each case output the answer modulo 109+7.