Will it work?

I had unprotected sex with my boyfriend and he came inside me we took the morning after pill within 2 hours. Later on in the day I realised I was on my most fertile period will it still work?