Problem

Source: Shortlist OSN Indonesia 2014, N5

Tags: number theory, pigeonhole principle, national olympiad



Prove that we can give a color to each of the numbers $1,2,3,...,2013$ with seven distinct colors (all colors are necessarily used) such that for any distinct numbers $a,b,c$ of the same color, then $2014\nmid abc$ and the remainder when $abc$ is divided by $2014$ is of the same color as $a,b,c$.