Part of 1984 National High School Mathematics League
Source: 1984 National High School Mathematics League, Exam One, Problem 9