Stable marriages with restricted pairs