Masturbating and sex

Is sex and masturbation ok at 12 weeks?  I have read different things on here and want to make sure it's safe for myself and the baby.