MathDB

Problem 2

Part of 2022 Kyiv City MO Round 1