LaLa and Monster Hunting (Part 2)

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

문제

A dreadful monster has been witnessed in a forest near the city of magic\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}} Sharia, and a group of valorous adventurers will hunt it down in few days before it hurt anyone. However, LaLa\color{blue}{\text{LaLa}} knows that the real reason those adventurers are willing to take the risk is to obtain the rare magic\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}} stone that the monster is known to produce in its intestines. LaLa\color{blue}{\text{LaLa}} would like to obtain the magic\color{red}{\text{m}} \color{brown}{\text{a}} \color{orange}{\text{g}} \color{blue}{\text{i}} \color{magenta} {\text{c}} stone before they do, as it is known to be quite beautiful.

Currently, LaLa\color{blue}{\text{LaLa}} knows a rough estimate of the location of the monster. However, the monster excels at camouflage, so it's really hard to hunt it down when it's hiding in the network of branches.

For the sake of simplicity, we'll model the monster as a graph GG with 66 vertices described below:

The network of branches can be modeled as a simple graph HH. A candidate is a subgraph of HH that is isomorphic to GG. In other words, it is a graph obtained by deleting some edges from HH, and then deleting some vertices that none of the remaining edges are incident to, whose vertices can be renumbered so that it coincides with GG. LaLa\color{blue}{\text{LaLa}} will now have to examine all possible candidates to search and hunt the monster down.

Write a program that computes the number of candidates LaLa\color{blue}{\text{LaLa}} will have to examine, modulo 998,244,353998\\,244\\,353.

입력

The input describes the branch network HH and is given in the following format:

NN MM

u_0u\_0 v_0v\_0

u_1u\_1 v_1v\_1

\vdots

u_M1u\_{M-1} v_M1v\_{M-1}

where NN is the number of joints, numbered from 00 to N1{N-1} and MM is the number of branches, ii-th of which connects the joints u_iu\_i and v_iv\_i.

The input satisfies the following constraints:

  • All the numbers in the input are integers.
  • 2N100,0002 \le N \le 100\\,000
  • 0M100,0000 \le M \le 100\\,000
  • 0u_i<v_i<N0 \le u\_i < v\_i < N for all integers 0i<M0 \le i < M
  • u_iu_ju\_i \ne u\_j or v_iv_jv\_i \ne v\_j for all integers 0i<j<M0 \le i < j < M

Note that the network is not necessarily connected.

출력

The output should be a single integer equal to the number of candidates, modulo 998,244,353998\\,244\\,353.

힌트

The followings illustrate the 44 candidates (the regular edges) of the branch network in the first sample test.