UVa 10299 - Relatives

10299 - Relatives

 * http://acm.uva.es/p/v102/10299.html

Summary
Find number of integers less than n which is relatively prime to n.

Explanation
What they are asking for is actually to find the value of the Euler's Phi function for n. So just apply the formula to find the Euler's Phi function and you would get the answer.

Input
7 12 0

Output
6 4