**Neko** is a freshman at SUSTech and he is good at fractorial problems. He wants to challenge you to see if you can solve the following problem:
Caculate the value of \(((n!)!)!(mod\space m)\).

Submit: 1179 Solved: 238

[Submit][Status][Web Board]

**Neko** is a freshman at SUSTech and he is good at fractorial problems. He wants to challenge you to see if you can solve the following problem:
Caculate the value of \(((n!)!)!(mod\space m)\).

There is only one line contains two integers \(n,m,(0{\leq}n{\leq}10^9,1{\leq}m{\leq}10^9)\).

Print the value of \(((n!)!)!(mod\space m)\).

`1 2019`

`1`

In mathematics, the factorial of a positive integer n, denoted by n!, is the product of all positive integers less than or equal to n: For example, The value of 0! is 1, according to the convention for an empty product.