A Math Contest P16 - Morbius vs. Suibom
View as PDFLet  be the lowest common multiple of 
 and 
 and 
 be the greatest common divisor of 
 and 
. Determine 
 modulo a prime number, 
.
Input Specification
The only line will contain two space-separated integers,  
 and 
 
.
Output Specification
Output  modulo 
.
Sample Input
10 131
Sample Output
64
Comments