Perfect squares and their sums