#C2342. Even and Odd Permutations
Even and Odd Permutations
Even and Odd Permutations
Given an integer \(n\) (\(1 \le n \le 100\)), determine whether there exist both an even and an odd permutation of \(n\) elements. A permutation is even if it can be obtained by an even number of swaps from the identity permutation; otherwise, it is odd. Note that when \(n = 1\), there is only one permutation (which is even), so the answer is NO
. For all \(n \ge 2\), both even and odd permutations exist, and hence the answer must be YES
.
inputFormat
The input consists of a single line containing one integer \(n\).
outputFormat
Output a single line with the string YES
if both an even and an odd permutation exist for the given \(n\), otherwise output NO
.
3
YES
</p>