Part of 2003 Romania Team Selection Test
Source: Romanian IMO Team Selection Test TST 2003, problem 7