The sum of the areas of two squares is 640 m². If the difference in their perimeter is 64 m, find the sides of the two squares.