Under construction

Still being built. Things may change

Double Clique

Time limit2sMemory limit512 MB

Summary
Count the subsets S that are cliques in G while the remaining vertices have no edges among them in G, modulo 1e9+7, for a graph with up to 2e5 nodes.
Level

Medium7 of 10

Topics
Graph, Combinatorics, Implementation
Solved
No attempts yet

Problem

You are given an undirected graph GG with nn nodes and mm edges. The set of vertices is VV and the set of edges is EE.

Let the complement of GG be G′G'. The complement has all the same nodes, but if there is no edge between nodes aa and bb in GG, then G′G' has an edge between aa and bb. If GG has an edge between aa and bb, then G′G' has no edge between them.

A clique is a subset of nodes where every pair has an edge. A subset of nodes SS is a double clique if SS is a clique in GG and V−SV - S is a clique in G′G'. The empty set counts as a clique.

Given the graph, count the double cliques modulo 109+710^9 + 7.

Input

The first line has two integers nn and mm (1≤n,m≤2×1051 \le n, m \le 2 \times 10^5). Each of the next mm lines has two integers aa and bb (1≤a<b≤n1 \le a < b \le n), meaning there is an edge between nodes aa and bb. All edges are unique.

Output

Print a single integer, the number of double cliques modulo 109+710^9 + 7.

Examples1

  1. Example 1

    Input
    3 3
    1 3
    1 2
    2 3
    
    Expected output
    4