Malta will take in 49 migrants stranded on boats, then redistribute to eight European Union countries.