In a group of nine people each person shakes hands with exactly two of the other people from the group. Let N be the number of ways this handshaking can occur. Consider two handshaking arrangements different if and only if at least two people who shake hands under one arrangement do not shake hands under the other arrangement. Find the remainder when N is divided by 1000 .