Is there an "easy" way to define self-contact?

Hi, I am trying to do self-contact simulation, could u please give me the input file.