The leaders of Hungary and Slovakia have backed Italy’s decision to refuse entry to more than 600 people rescued in the Mediterranean at the weekend.