Part of 2006 Singapore Junior Math Olympiad
Source: Singapore Junior Math Olympiad 2006 2nd Round p1 SMO