Part of 1983 National High School Mathematics League
Source: 1983 National High School Mathematics League, Exam One, Problem 6