Part of 1981 National High School Mathematics League
Source: 1981 National High School Mathematics League, Problem 9