Can you ???

If your on the pill and have unprotected sex but he doesn't cum in you and if there's precum can you still get pregnant ?