Which shape has a longer perimeter: a circle with a diameter of 10 cm or a square with side lengths of 8 cm?