F. Forest Program
time limit per test
1 second
memory limit per test
1024 megabytes
input
standard input
output
standard output

The kingdom of Z is fighting against desertification these years since there are plenty of deserts in its wide and huge territory. The deserts are too arid to have rainfall or human habitation, and the only creatures that can live inside the deserts are the cactuses. In this problem, a cactus in desert can be represented by a cactus in graph theory.

In graph theory, a cactus is a connected undirected graph with no self-loops and no multi-edges, and each edge can only be in at most one simple cycle. While a tree in graph theory is a connected undirected acyclic graph. So here comes the idea: just remove some edges in these cactuses so that the remaining connected components all become trees. After that, the deserts will become forests, which can halt desertification fundamentally.

Now given an undirected graph with $$$n$$$ vertices and $$$m$$$ edges satisfying that all connected components are cactuses, you should determine the number of schemes to remove edges in the graph so that the remaining connected components are all trees. Print the answer modulo 998244353.

Two schemes are considered to be different if and only if the sets of removed edges in two schemes are different.

Input

The first line contains two non-negative integers $$$n, m~(1\le n \le 300\,000, 0\le m \le 500\,000)$$$, denoting the number of vertices and the number of edges in the given graph.

Next $$$m$$$ lines each contains two positive integers $$$u,v~(1\le u,v \le n, u\neq v)$$$, denoting that vertices $$$u$$$ and $$$v$$$ are connected by an undirected edge.

It is guaranteed that each connected component in input graph is a cactus.

Output

Output a single line containing a non-negative integer, denoting the answer modulo 998244353.

Examples
Input
3 3
1 2
2 3
3 1
Output
7
Input
6 6
1 2
2 3
3 1
2 4
4 5
5 2
Output
49