Part of 1986 National High School Mathematics League
Source: 1986 National High School Mathematics League, Exam One, Problem 7