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