Check whether the given no is prime or not.
Implement is_prime(n) to return True when n has exactly two positive divisors, 1 and itself. Return False for numbers less than 2. Use an efficient primality test rather than checking every value up to n.
Input: One integer n.
Output: A Boolean value.
def is_prime(n):