Irish proverb:

He who sups with the devil must use a very long spoon