Codeforces Round 972 Div. 2 D. Alter The Gcd