#ablf. [abl_f]Heights and Pairs

[abl_f]Heights and Pairs

Problem Statement

There are 2N2N people numbered 11 through 2N2N. The height of Person ii is hih_i.

How many ways are there to make NN pairs of people such that the following conditions are satisfied? Compute the answer modulo 998,244,353998,244,353.

  • Each person is contained in exactly one pair.
  • For each pair, the heights of the two people in the pair are different.

Two ways are considered different if for some pp and qq, Person pp and Person qq are paired in one way and not in the other.

Constraints

  • 1leqNleq50,0001 \\leq N \\leq 50,000
  • 1leqhileq100,0001 \\leq h_i \\leq 100,000
  • All values in input are integers.

Input

Input is given from Standard Input in the following format:

NN h1h_1 :: h2Nh_{2N}

Output

Print the answer.


Sample Input 1

2
1
1
2
3

Sample Output 1

2

There are two ways:

  • Form the pair (Person 11, Person 33) and the pair (Person 22, Person 44).
  • Form the pair (Person 11, Person 44) and the pair (Person 22, Person 33).

Sample Input 2

5
30
10
20
40
20
10
10
30
50
60

Sample Output 2

516