#abc244e. [abc244_e]King Bombee

[abc244_e]King Bombee

Problem Statement

You are given a simple undirected graph with NN vertices and MM edges. The vertices are numbered from 11 through NN, and the edges are numbered from 11 through MM. Edge ii connects Vertex UiU_i and Vertex ViV_i.

You are given integers K,S,TK, S, T, and XX. How many sequences A=(A0,A1,dots,AK)A = (A_0, A_1, \\dots, A_K) are there satisfying the following conditions?

  • AiA_i is an integer between 11 and NN (inclusive).
  • A0=SA_0 = S
  • AK=TA_K = T
  • There is an edge that directly connects Vertex AiA_i and Vertex Ai+1A_{i+1}.
  • Integer X(XS,XT)X\\ (X≠S,X≠T) appears even number of times (possibly zero) in sequence AA.

Since the answer can be very large, find the answer modulo 998244353998244353.

Constraints

  • All values in input are integers.
  • 2N20002≤N≤2000
  • 1M20001≤M≤2000
  • 1K20001≤K≤2000
  • 1S,T,XN1≤S,T,X≤N
  • XSX≠S
  • XTX≠T
  • 1Ui<ViN1≤U_i<V_i≤N
  • If iji ≠ j, then (Ui,Vi)(Uj,Vj)(U_i, V_i) ≠ (U_j, V_j).

Input

Input is given from Standard Input in the following format:

NN MM KK SS TT XX U1U_1 V1V_1 U2U_2 V2V_2 vdots\\vdots UMU_M VMV_M

Output

Print the answer modulo 998244353998244353.


Sample Input 1

4 4 4 1 3 2
1 2
2 3
3 4
1 4

Sample Output 1

4

The following 44 sequences satisfy the conditions:

  • (1,2,1,2,3)(1, 2, 1, 2, 3)
  • (1,2,3,2,3)(1, 2, 3, 2, 3)
  • (1,4,1,4,3)(1, 4, 1, 4, 3)
  • (1,4,3,4,3)(1, 4, 3, 4, 3)

On the other hand, (1,2,3,4,3)(1, 2, 3, 4, 3) and (1,4,1,2,3)(1, 4, 1, 2, 3) do not, since there are odd number of occurrences of 22.


Sample Input 2

6 5 10 1 2 3
2 3
2 4
4 6
3 6
1 5

Sample Output 2

0

The graph is not necessarily connected.


Sample Input 3

10 15 20 4 4 6
2 6
2 7
5 7
4 5
2 4
3 7
1 7
1 4
2 9
5 10
1 3
7 8
7 9
1 6
1 2

Sample Output 3

952504739

Find the answer modulo 998244353998244353.