Part of 2016 Federal Competition For Advanced Students, P1
Source: 47th Austrian Mathematical Olympiad National Competition Part 1 Problem 4