Note that w=cos6π+i⋅sin6π is a primitive twelfth root of unity, so w3=i and wr=wr+12m for all integers m and r. Furthermore, z=cos32π+i⋅sin32π is a primitive cube root of unity, so w4=z and
i⋅wr=wr+12m+3=zs=w4s.
Hence the given equation requires that there exists an integer m such that r+12m+3=4s, so r+3≡4s(mod12). In particular, r+3≡0,4, or 8(mod12).
* If r+3≡0(mod12), then r=9+12m and s=3n, where 0≤m≤7 and 1≤n≤33, accounting for 8⋅33=264 ordered pairs.
* If r+3≡4(mod12), then r=1+12m and s=1+3n, where 0≤m≤8 and 0≤n≤33, accounting for 9⋅34=306 ordered pairs.
* If r+3≡8(mod12), then r=5+12m and s=2+3n, where 0≤m≤7 and 0≤n≤32, accounting for 8⋅33=264 ordered pairs.
The requested number of ordered pairs (r,s) is therefore 264+306+264=834.