\(66=2\times 3\times 3\times 37\)

\(=(1+i)(1-i)[(1+\sqrt{2i})(1-\sqrt{2i})]^{2}(1+6i)(1-6i)\)

We know \(N(a+bi)=a^{2}+b^{2}=666\).

This looks like a circle equation where the radius is \(\sqrt{666}\approx25.81\).

Thus, a,b < 25.81 as a and b are to be integers.

On close observation, the values of a,b are

(22,15),(-22,15),(22,-15),(-22,-15)

(15,22),(-15,22),(15,-22),(-15,-22)

Therefore, the number of ways in which 666 can be written in sum of 2 integer squares is 8.

\(=(1+i)(1-i)[(1+\sqrt{2i})(1-\sqrt{2i})]^{2}(1+6i)(1-6i)\)

We know \(N(a+bi)=a^{2}+b^{2}=666\).

This looks like a circle equation where the radius is \(\sqrt{666}\approx25.81\).

Thus, a,b < 25.81 as a and b are to be integers.

On close observation, the values of a,b are

(22,15),(-22,15),(22,-15),(-22,-15)

(15,22),(-15,22),(15,-22),(-15,-22)

Therefore, the number of ways in which 666 can be written in sum of 2 integer squares is 8.