  We determine the shape of all sum-free sets in $\{1,2,\ldots,n\}^2$ of size
close to the maximum $\frac{3}{5}n^2$, solving a problem of Elsholtz and
Rackham. We show that all such asymptotic maximum sum-free sets lie completely
in the stripe $\frac{4}{5}n-o(n)\le x+y\le\frac{8}{5}n+ o(n)$. We also
determine for any positive integer $p$ the maximum size of a subset $A\subseteq
\{1,2,\ldots,n\}^2$ which forbids the triple $(x,y,z)$ satisfying $px+py=z$.
