Part of 1999 Finnish National High School Mathematics Competition
Source: Finnish Mathematics Competition 1999, Final Round, Problem 1