Problem

Source: Bulgaria MO 2001 Day 2 Problem 1

Tags: geometry, rectangle, combinatorics proposed, combinatorics



Let $n \geq 2$ be a given integer. At any point $(i, j)$ with $i, j \in\mathbb{ Z}$ we write the remainder of $i+j$ modulo $n$. Find all pairs $(a, b)$ of positive integers such that the rectangle with vertices $(0, 0)$, $(a, 0)$, $(a, b)$, $(0, b)$ has the following properties: (i) the remainders $0, 1, \ldots , n-1$ written at its interior points appear the same number of times; (ii) the remainders $0, 1, \ldots , n -1$ written at its boundary points appear the same number of times.