Part of 2000 Finnish National High School Mathematics Competition
Source: Finnish Mathematics Competition 2000, Final Round, Problem 2