For this Question: Given an integer N, your task is to check whether the given number is prime or notThe input contains a single integer N.

Constraints:-
1 <= N <= 100000000000Print "YES" If the given number is prime else print "NO".Sample Input:-
2

Sample Output:-
YES

Sample Input:-
4

Sample Output:-
NO, I have written this Solution Code: #include <bits/stdc++.h>
using namespace std;
int main(){
long n;
cin>>n;
long x = sqrt(n);
for(int i=2;i<=x;i++){
if(n%i==0){cout<<"NO";return 0;}
}
cout<<"YES";
}, In this Programming Language: C++, Now tell me if this Code is compilable or not?