Primes and Multiplication
시간 제한1초메모리 제한1024 MB
x의 각 소인수 p에 대해 i를 나누는 가장 큰 p의 거듭제곱을 구하고, i가 1부터 n까지일 때 그 값들을 모두 곱한 결과를 출력한다.
문제
Let's introduce some definitions that will be needed later.
Let be the set of prime divisors of . For example, , .
Let be the maximum possible integer where is an integer such that is divisible by . For example:
- ( is divisible by but not divisible by ),
- ( is divisible by but not divisible by ).
Let be the product of for all in . For example:
- ,
- .
You have integers and . Calculate .
입력
The only line contains integers and (, ) --- the numbers used in formula.
출력
Print the answer.
힌트
In the first example, , .
In the second example, actual value of formula is approximately . Make sure you print the answer modulo .
In the third example, be careful about overflow issue.