Search for a correlation between the UHECRs measured by the Pierre Auger Observatory and the Telescope Array and the neutrino candidate events from IceCube and ANTARES