The countries agree a plan to distribute funds to EU member states worst affected by the pandemic.