Having first time sex and avoid pregnancy

Patient: I had sex today..and my partner eject outside..may i get pregnant…if yes how to avoid it??

Doctor: