Macedonia and Spain through to Eurobasket semis