Онлайн компилятор C

#include <stdio.h> int main() { int num,i=1,sum=0; scanf("%d",&num); while(i<=num){ if(num%i==0) sum++; i++; } if(sum>2 && ) printf("NO"); else printf("YES"); return 0; }
This code reads an integer and checks if it is prime by counting its divisors. It increments `sum` for each divisor found, then prints "YES" if the number is prime and "NO" otherwise. However, the condition on line 10 is incomplete.

- The condition `if(sum>2 && )` is missing a second operand after the `&&` operator. You need to complete the logical expression to decide when to print "NO".
- A prime number has exactly two divisors (1 and itself), so `sum` should equal 2 for a prime. Think about what condition on `sum` would indicate the number is not prime.