There are nnn pairs of segments in the X-axis. The iii-th of them is [li,ri][l_{i},r_{i}][li,ri] and [li′,ri′][l'_{i},r'_{i}][li′,ri′].
You should choose exactly one segment from each pair (that is, choose either [li,ri][l_{i},r_{i}][li,ri] or [li′,ri′][l'_{i},r'_{i}][li′,ri′] for each iii), satisfying that there exists at least one point xxx, which is included by all the chosen segments.
You need to determine the number of different ways of choosing the segments (over 2n2^n2n possible ways) that satisfies the condition, output it modulo 109+710^9+7109+7.
Two ways are considered different if and only if there exists iii, such that [li,ri][l_{i},r_{i}][li,ri] is chosen in one way, and [li′,ri′][l'_{i},r'_{i}][li′,ri′] is chosen in another. Note that even if [li,ri]=[li′,ri′][l_{i},r_{i}] = [l'_{i},r'_{i}][li,ri]=[li′,ri′], the two ways are considered different.