Labelled graphs
Very easy
Execution time limit is 1 second
Runtime memory usage limit is 128 megabytes
Let the number of vertices in a graph be . Compute the number of labelled graphs with vertices (labelled means that the vertices are marked with the numbers from to ). The edges of the graphs are considered undirected, and loops and multiple edges are forbidden.
Input
The number of vertices in the graph.
Output
Print the number of labelled graphs with vertices. Print the answer modulo .
Examples
Input #1
Answer #1
Input #2
Answer #2
Submissions 152
Acceptance rate 30%