Watermelon
Explicación
Podemos partir la sandía por la mitad si y solo si el peso es un número par y es mayor que 2.
Implementación
Complejidad temporal:
#include <iostream>
using namespace std;
int main() {
int w;
cin >> w;
if (w % 2 == 0 && w > 2) {
cout << "YES" << endl;
} else {
cout << "NO" << endl;
}
}import java.io.*;
import java.util.*;
public class Watermelon {
public static void main(String[] args) {
Kattio io = new Kattio();
int w = io.nextInt();
if (w % 2 == 0 && w > 2) {
io.println("YES");
} else {
io.println("NO");
}
io.close();
}
// CodeSnip{Kattio}
}w = int(input())
if w % 2 == 0 and w > 2:
print("YES")
else:
print("NO")