Given an integer, , perform the following conditional actions:

If is odd, print Weird
If is even and in the inclusive range of to , print Not Weird
If is even and in the inclusive range of to , print Weird
If is even and greater than , print Not Weird
Complete the stub code provided in your editor to print whether or not is weird.

Input Format

A single line containing a positive integer, .

Constraints

Output Format

Print Weird if the number is weird; otherwise, print Not Weird.

in java code

```java

import java.util.Scanner;

public class Solution {

public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
scanner.close();

if (n % 2 == 1) {
System.out.println("Weird");
} else {
if (n >= 2 && n <= 5) {
System.out.println("Not Weird");
} else if (n >= 6 && n <= 20) {
System.out.println("Weird");
} else {
System.out.println("Not Weird");
}
}
}
}
```

Here is the Java code solution:

```java
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();

if (n % 2 == 1 || (n >= 6 && n <= 20)) {
System.out.println("Weird");
} else {
System.out.println("Not Weird");
}

scanner.close();
}
}
```

Explanation:
1. We take input for an integer value and store it in the variable `n`.
2. We use an `if` statement to check the given conditions:
- If `n` is odd (i.e., when `n` modulo 2 is 1), or
- If `n` is even and in the range of 6 to 20 (inclusive), we print "Weird".
- Otherwise, we print "Not Weird".
3. Finally, we close the `Scanner` object.

This code will take an input number, check the conditions, and print "Weird" or "Not Weird" accordingly.

Here is the Java code to solve the problem:

```java
import java.util.Scanner;

public class Main {
public static void main(String[] args) {
Scanner scanner = new Scanner(System.in);
int n = scanner.nextInt();
scanner.close();

if (n % 2 != 0) {
// If n is odd, print Weird
System.out.println("Weird");
} else {
if (n >= 2 && n <= 5) {
// If n is even and in the inclusive range of 2 to 5, print Not Weird
System.out.println("Not Weird");
} else if (n >= 6 && n <= 20) {
// If n is even and in the inclusive range of 6 to 20, print Weird
System.out.println("Weird");
} else {
// If n is even and greater than 20, print Not Weird
System.out.println("Not Weird");
}
}
}
}
```

To get the answer, perform the following steps:

1. Read the input integer from the user using a `Scanner` object.
2. Check if the number is odd by using the condition `n % 2 != 0`. If true, print "Weird".
3. Otherwise, check if the number is in the inclusive range of 2 to 5 using the condition `n >= 2 && n <= 5`. If true, print "Not Weird".
4. If the above condition is false, check if the number is in the inclusive range of 6 to 20 using the condition `n >= 6 && n <= 20`. If true, print "Weird".
5. If none of the above conditions are true, the number is even and greater than 20, so print "Not Weird".