MathDB

Problem 3

Part of 2017 Pakistan TST