sexxx??

i had sex 2 weeks ago and it was the day after i had my period..it was protected sex and im on pill and he pulled out way before anything happened. i want to know when the safest time to have sex is (to avoid pregnancy) ??? im due for my period next week but ive been stressing like hell that i could be pregnant....