Oops, problem statement was 1-based
Problem 9