largestBasinProduct :: Grid -> Int
largestBasinProduct grid =
  product $ take 3 $ reverse $ sort $ map (basinSizeForCoords grid) $ keys $ lowPoints grid

main = do
    input <- parsedInput (2021, 9) lines
    print $ riskLevelSum $ gridMap input
    print $ largestBasinProduct $ gridMap input
