We choose 100 points in the coordinate plane. Let $N$ be the number of triples $(A, B, C)$ of distinct chosen points such that $A$ and $B$ have the same $y$-coordinate, and $B$ and $C$ have the same $x$-coordinate. Find the greatest value that $N$ can attain considering all possible ways to choose the points.

Let's think step by step and output the final answer within \boxed{}.
user