Considering a clique of n vertices. Determine if it is possible to divide the set of vertices into two equal halves such that there is an edge between any two vertices of the two halves. A clique is a graph with an edge between any two distinct vertices.
Examples:
Input : 5 Output : NO Input : 2 Output : YES
Approach:
The answer would βYESβ if n is even.
Else the answer would be βNOβ.
That is, it is only possible to divide the clique into 2 halves only if n is divisible by 2.
# Below is the Python implementation of the above code
n = 2
if n % 2 == 0:
print("YES")
else:
print("NO")
Output:
YES
