Is 5,987 Prime?

Yes

5987  = 59871