Can you get pregnant by?

Can you get pregnant by having sex the day before ovulation and on the day of ovulation?