Eulerian Orientation

아직 제출이 없습니다시간 제한2초메모리 제한512 MB

문제

It is well known that an undirected graph is eulerian if and only if each vertex has an even degree.

Yuuka has an undirected graph with nn vertices and mm edges. The vertices are conveniently labeled with 1,2,,n1, 2, \dots, n. All edges are initially blue. Yuuka plans to paint some of the edges red, and leave other edges blue. If the subgraph formed by the red edges is eulerian, she will add x2x^2 to the counter, where xx is the number of red edges.

Let the counter account for all 2m2^m ways to paint the edges. Yuuka would like to know the total value of the counter modulo (109+7)(10^9+7).

입력

The input contains zero or more test cases, and is terminated by end-of-file. For each test case:

The first line contains two integers nn and mm (1n21051 \leq n \leq 2 \cdot 10^5, 0m21050 \leq m \leq 2 \cdot 10^5).

The ii-th of the following mm lines contains two integers a_ia\_i and b_ib\_i which denote an edge between vertices a_ia\_i and b_ib\_i (1a_i,b_in1 \leq a\_i, b\_i \leq n).

It is guaranteed that neither the sum of all nn nor the sum of all mm exceeds 21052 \cdot 10^5.

출력

For each test case, output an integer which denotes the result.