Both teams needed a win to revive slim hopes of reaching the last eight but finished behind Tunisia and Angola in the standings.