EU court rejects Hungary, Slovak case against taking refugees