Part of 2017 Abels Math Contest (Norwegian MO) Final
Source: Norwegian Mathematical Olympiad 2017 - Abel Competition p1b