Is 5,843 Prime?

Yes

5843  = 58431