Is 5023 a Prime Number

YES
5023 is a prime number.
5023 is not a composite number.

Reason

5023 only has 1 and itself 2 factors

Check Numbers related to 5023