You are given two integers () and (). Initially, you have an array of zeros, and applied queries on it. Query is given as , where you apply = xor (xor denotes the operation bitwise XOR) for every between and . But this problem seems boring, so Almas modify some queries interval. By modifying, he applied that operation on a subset of positions on a segment(maybe empty subset). Now he asks you how many different arrays he could have after applying queries. Since the answer can be large, output by modulo 1000000007 ().
Input
- In first line, you are given two integers and .
- In next lines, you are given .
Output
-Print in a single line answer by modulo 1000000007.
Constraints
-
-
-
-
if we apply query on position , is else . so there different arrays