Spain, Slovenia into Olympic basketball quarter-finals