E. Ginger's coloring
time limit per test
1 second
memory limit per test
256 megabytes
input
standard input
output
standard output

Given an permutation $$$p_1, p_2, \dots,p_n$$$ of length $$$n$$$, now color each number from $$$1$$$ to $$$n$$$ in black and white.

Define $$$\texttt{Ginger coloring}$$$ as:

for all $$$i$$$ $$$(1 \le i \le n)$$$, the color of $$$i$$$ not equal to the color of $$$p_i$$$.

How many ways of coloring make permutation $$$p$$$ become $$$\texttt{Ginger coloring}$$$ modulo $$$998\,244\,353$$$.

Input

The first line contains a integer $$$n$$$ $$$(1 \le n \le 10 ^ 5)$$$ indicating the lenth of permutation.

The next line contains $$$n$$$ integers $$$p_1,p_2,\cdots,p_n$$$ $$$(1 \le p_i \le n)$$$ indicating the permutation.

Output

Output the ways of coloring modulo $$$998\,244\,353$$$.

Example
Input
6
2 3 4 1 6 5
Output
4