Solution
= Solution
The sign choices that make each dominant cosine positive at the selected maximum are:
* $(0,0)$: $S(10)=+$ and $S(01)=+$.
* $(\tfrac12,0)$: $S(10)=-$ and $S(01)=+$.
* $(0,\tfrac12)$: $S(10)=+$ and $S(01)=-$.
* $(\tfrac12,\tfrac12)$: $S(10)=-$ and $S(01)=-$.
Equivalently, at a selected maximum $(x_0,y_0)$, the signs are $(-1)^{2x_0}$ and $(-1)^{2y_0}$.