coder_penguin's submission of Beautiful Pairs | CodeChef