Can you get pregnant on a period

Mermaid
I was just wondering can you get pregnant from having sex on the first or second day of a period ! If so how long should you wait to test ?