Limits 1s, 512 MB

Bikash, an aspiring programmer, aims to create an Artificial Intelligence program capable of solving a wide range of mathematical problems.

However, during the initial development stage, he encountered a limitation. The program can only handle sets of three small numbers within a specific limit. So he named it SmallAI. Recognizing the need to enhance SmallAI's capabilities, Bikash seeks your assistance.

Your task is to evaluate whether SmallAI can handle a given set of three numbers, AA, BB and CC. It is important to note that SmallAI can only work with numbers that are less than or equal to a specific limit, denoted by XX.

Write a program that determines whether SmallAI can work with all the provided numbers or not.

Input

The input consists of a single line containing four space-separated integers: XX, AA, BB, and CC— The variable XX denotes the limit of SmallAI, while AA, BB, and CC represent three integers that AI can work with, respectively.

1X10001 \le X \le 1000
0A,B,C10000 \le A,B,C \le 1000

Output

Print "OK" if SmallAI can handle all the provided numbers. Otherwise, print "ERROR".

Samples

InputOutput
10 5 8 12
ERROR

In the first example:

The limit of SmallAI is X=10X = 10. The given set of numbers are A=5A = 5, B=8B = 8, and C=12C = 12.

SmallAI can easily process AAand BBbecause, AXA \le X and BXB \le X, but as C>XC>X, SmallAI cannot process all of the provided numbers. Therefore, the output is "ERROR".

InputOutput
10 4 5 6
OK

Submit

Login to submit.

Statistics

93% Solution Ratio
Tanbir_kobiEarliest, 11M ago
user.5431Fastest, 0.0s
Tanbir_kobiLightest, 4.9 MB
Nusab19Shortest, 74B
Toph uses cookies. By continuing you agree to our Cookie Policy.