Part of 2009 Paraguay Mathematical Olympiad
Source: Paraguayan National Olympiad 2009, Level 3, Problem 4