Part of 2010 Regional Competition For Advanced Students
Source: 41st Austrian Mathematical Olympiad, regional competition, problem 2)