is this true?

Is it true that if you have sex when your not ovulating and fertile you can't get pregnant???