forked from zakariamaaraki/RemoteCodeCompiler
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathWatermelon.java
More file actions
55 lines (47 loc) · 1.23 KB
/
Watermelon.java
File metadata and controls
55 lines (47 loc) · 1.23 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
import java.io.*;
import java.util.*;
// From Codeforces
public class main {
private void run() throws IOException {
int n = in.nextInt();
if (n >= 4 && (n - 2) % 2 == 0) {
out.println("YES");
} else {
out.println("NO");
}
out.flush();
}
private class Scanner {
private StringTokenizer tokenizer;
private BufferedReader reader;
public Scanner(Reader in) {
reader = new BufferedReader(in);
tokenizer = new StringTokenizer("");
}
public boolean hasNext() throws IOException {
while (!tokenizer.hasMoreTokens()) {
String next = reader.readLine();
if (next == null)
return false;
tokenizer = new StringTokenizer(next);
}
return true;
}
public String next() throws IOException {
hasNext();
return tokenizer.nextToken();
}
public String nextLine() throws IOException {
tokenizer = new StringTokenizer("");
return reader.readLine();
}
public int nextInt() throws IOException {
return Integer.parseInt(next());
}
}
public static void main(String[] args) throws IOException {
new Watermelon().run();
}
Scanner in = new Scanner(new InputStreamReader(System.in));
PrintWriter out = new PrintWriter(new BufferedWriter(new OutputStreamWriter(System.out)));
}