Number Sum

The following grid of size 5x5 is partially complete with whole numbers from 1 to 7.

The sum of each row and column is shown on the edges of the grid.

Fill in the missing numbers to complete the grid.

1617212518
21475
227464
2472
224277
81