Algorithm Was Applied

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

문제

Consider a connected undirected graph on nn vertices. Denote this graph as the starting graph.

A tuple of integers (a,b,c)(a, b, c)~(1a<b<cn1 \leq a < b < c \leq n) is good if and only if

  1. Vertices aa and bb are connected by an edge.
  2. Vertices aa and cc are connected by an edge.
  3. Vertices bb and cc are not connected by an edge.

The following algorithm was applied to the starting graph. While there is one, choose an arbitrary good tuple (a,b,c)(a, b, c) and add an edge between vertices bb and cc. Denote the resulting graph as the completed graph. It can be proven that the completed graph does not depend on the choices of good tuple at each iteration.

You are given a starting graph. How many colorings in nn colors does the completed graph have? Graph coloring is an assignment of colors to vertices such that no two adjacent vertices share a color. Refer to problem D if you need an even more formal definition.

Output the correct answer modulo 998244353. Formally, if the real answer is yy and your answer is xx, it will be considered correct if 263x<263-2^{63} \leq x < 2^{63} and xyx-y is divisible by 998244353.

입력

The first line of input contains two integers nn and mm~(2n3105,1m31052 \leq n \leq 3 \cdot 10^5, 1 \leq m \leq 3 \cdot 10^5), the number of vertices and edges in the starting graph, respectively.

Next mm lines contain descriptions of starting graph edges. The ii-th of them contains integers uu and vv~(1u<vn1 \leq u < v \leq n), the endpoints of the ii-th edge.

It is guaranteed that the given graph is connected and doesn't contain multiple edges.

출력

Print a single integer, the number of colorings in nn colors of the completed graph modulo 998244353.

힌트

In the first example the starting graph looks like this:

The only possible good tuple is (1,2,3)(1, 2, 3), so completed graph looks like this:

Here are all 66 colorings of such a graph in 33 colors: