#include <cstdio> int main() { int weight; scanf("%d", &weight); if (weight & 1 || weight <= 2) // 判断奇偶按位与一下就行 // 如果结果是1,就是奇,0就是偶 puts("NO, you can't divide the watermelon into two even parts."); else puts("YES, you can divide the watermelon into two even parts."); return 0; }