Part of 2011 Saint Petersburg Mathematical Olympiad
Source: St Petersburg Olympiad 2011, Grade 11, P1