In the figure below, how many ways are there to select two squares which do not share an edge?

[asy]
size(3cm);
for (int t = -2; t <= 2; t=t+1) { draw( shift((t,0))*unitsquare ) ; if (t!=0) draw( shift((0,t))*unitsquare ); }
[/asy]

[i]Proposed by Evan Chen[/i]