Part of 2002 Greece Junior Math Olympiad
Source: Greece National Olympiad 2002 , Juniors , Problem 1.