Part of 2000 Mediterranean Mathematics Olympiad
Source: Greece National Olympiad 2000 , tst , Problem 1.