BUDAPEST, Hungary (AP) — The European Court of Justice says it has rejected efforts by Hungary and Slovakia to stay out of a European Union scheme meant to relocate refugees. The court said Wednesday that it had "dismissed in its entirety the actions brought by Slovakia and Hungary." EU countries agreed in September 2015 to relocate 160,000 refugees in Greece and Italy over two years. Only around 24,000 people have been relocated so far. The program is considered a key part of the EU's migration policy. Hungary and Poland voted against the plan and have refused to take part, while so far Slovakia has accepted only a handful of refugees from Greece.