Problem

Source: Saint Petersburg olympiad 2024, 9.1

Tags: number theory



Dima has red and blue felt—tip pens, with one of them he paints rational points on the numerical axis, and with the other - irrational ones. Dima colored $100$ rational and $100$ irrational points, after which he erased the signatures that allowed to find out where the origin was and what the scale was. Sergey has a compass with which he can measure the distance between any two colored points $A$ and $B$, and then mark on the axis a point located at a measured distance from any colored point $C$ (left or right); at the same time, Dima immediately paints it with the appropriate felt-tip pen. How Sergei can find out what color Dima paints rational points and what color he paints irrational ones?