It says in the Gemara (Sukkah 56b), "Woe to the wicked one, woe to his neighbor". If we take the letters in the Hebrew alphabet, for wicked (רשע), and then take the letters that come immediately after them, we get the word "partner" (שתף). This tells us effectively, "Woe to the wicked one, woe to his partner".
Additionally, the word for "woe" in Hebrew -- "Oy" (אוי), has the same numerical value in Gematria as the word for "good" -- Tob (טוב). A person has a choice where to live. If he chooses a home which is adjacent to one who is wicked, he is effectively making the statement that there is no benefit to be obtained by living next to a righteous person. In other words, no good emanates from one who is righteous. This causes him to lose the "good" and have it replaced by "woe".
Furthermore, it also indicates a rejection of the position that what one Jew does, affects another. For this he discovers the concept of "woe to the wicked one, woe to his neighbor".
(See Ben Yehoyada', Sukkah 56b)
Gemara Sukkah, good neigbours, wicked neighbors