1h40m connection time is plenty for INT-INT if your bags get checked through. You just clear security again and walk a short hallway, climb a couple flights of stairs and you are right in front of gate 18-ish
LATAM *should* check your bags through since both flights are operated by LATAM (just remember to let the counter agent know you'll only be in transit at LIM and keep both reservation locators -and ticket numbers, if possible- handy).
LATAM has been very anal lately about not checking bags through when interlining on different reservations, but since you are flying 100% LATAM I believe you should be OK.
If they don't check your bags through, I believe you can still make it, but you'll have to move quickly