Life of Phi II

Limits 1s, 512 MB

You will be given two integers n and m where GCD( n , m ) = 1. You have to tell that how many numbers are there from 1 to m * n that is co-prime to:

This is a companion discussion topic for the original entry at