If a number has only two factors 1 and itself, then the number is prime. Hence, by prime factorisation of the given number, we can easily determine a prime number.