Part of 2001 Singapore Senior Math Olympiad
Source: Singapore Senior Math Olympiad 2001 2nd Round p2 SMO