ioi 2014 - contest 1 - Bounce
GCD & Euler's totient function