Part of 1985 National High School Mathematics League
Source: 1985 National High School Mathematics League, Exam One, Problem 5