IUI done within 48 hours is fine and you definitely can have intercourse before as well as after IUI.