Team of Two CodeChef Solution