Răspuns :
int main(){
int n,div=2,nr_div=0;
cin>>n;
while(div<n){
if(n%div==0){
nr_div++;
}
div++;
}
if(nr_div>0)
cout<<"NU";
else
cout<<"DA";
}
#include<iostream>
using namespace std;
int main()
{
int n, div, prim=1;
cin>>n;
for(div=2;div*div<=n;div++)\
if(n%div==0) prim=0;
if(n<2) prim=0;
if(prim==1) cout<<"DA";
else cout<<"NU";
}