Pregnancy

So yesterday I had sex for the first time with my boyfriend and he had a condom on which had no holes or broke. But when he felt that he was about to ejaculate he pulled out can I pregnant or am I fine? Should I buy a plan B or no ? Ps he pulled out and it was pre cum that was in the condom