Given n and k, calculate φ(φ(...φ(n)...)), where φ applied exactly k times.
φ(n) is Euler's totient function. φ(1)=1 by definition.
You can find the definition of Euler's totient function here.
The only line of input contains two integers n and k (1≤n≤1018, 1≤k≤1018).
Print one integer - answer to the problem.
n≤103, k≤103 - 10 points
n≤106, k≤1018 - 15 points
n≤1012, k=1 - 10 points
n≤1012, k≤1018 - 10 points
n≤1015, k=1 - 5 points
n≤1015, k≤1018 - 40 points
n≤1018, k≤1018 - 10 points
φ(12)=4 and φ(4)=2
So the answer is 2.