Io day 2: problems 5 and 6