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