Victory keeps mathematical hopes of quarter-finals alive, although results must go their way