Problem

Source: 2020 USOMO Problem 4, USOJMO Problem 5

Tags: USOMO, usojmo, USO(J)MO, 2020 USAMO, 2020 USAJMO



Suppose that $(a_1,b_1),$ $(a_2,b_2),$ $\dots,$ $(a_{100},b_{100})$ are distinct ordered pairs of nonnegative integers. Let $N$ denote the number of pairs of integers $(i,j)$ satisfying $1\leq i<j\leq 100$ and $|a_ib_j-a_jb_i|=1$. Determine the largest possible value of $N$ over all possible choices of the $100$ ordered pairs. Proposed by Ankan Bhattacharya