Last Updated: 19 Apr, 2017

Check Prime

Easy

Problem statement

A prime number is a positive integer that is divisible by exactly 2 integers, 1 and the number itself.


You are given a number 'n'.


Find out whether 'n' is prime or not.


Example :
Input: 'n' = 5

Output: YES

Explanation: 5 is only divisible by 1 and 5. 2, 3 and 4 do not divide 5.
Input Format :
The first line of a test case contains a single integer 'n'.


Output Format :
Print “YES” if the number 'n' is prime. Print “NO” otherwise.


Note :
You do not need to print anything; it has already been taken care of. Just implement the given function and return the boolean value true/false depending on whether 'n' is prime or not.