pass/nopass for UC to UC transfer

I am applying to transfer to UCLA/UCB from another UC and am trying to fulfill UC reciprocity by completing all my GE’s. One of my current history GE’s is giving me trouble and I’m afraid a B in it would ruin my GPA. My transfer major is math/statistics. Would it be alright if I take this history class pass/no pass (it would be my only pass/no pass), or would UCB/UCLA look down on it?