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