Awkward question...

I've heard you can, but wasn't sure......but can you get pregnant if you have anal and he ejaculates inside you and the sperm comes out and goes into your vagina?