Try to keep it simple.
- Can you iterate over the pair sums in increasing order ?
- Can you iterate over the original number squares in increasing order ?
- Can you "combine" both iterations described above ?

Regards,
Zachm