When Is Divorce a Good Idea?