For an integer n3n \geq 3, let M\mathcal{M} be the set {(x,y)x,yZ,1xn,1yn}\{(x, y) \mid x, y \in \mathbb{Z}, 1 \leq x \leq n, 1 \leq y \leq n\} of points in the plane. (Z\mathbb{Z} is the set of integers.)

What is the maximum possible number of points in a subset SMS \subseteq \mathcal{M} which does not contain three distinct points being the vertices of a right triangle?