Limits 1s, 512 MB

You know Spider-Man was arrested on Mysterio’s murder case. Though everyone loves Spider-Man including the police officers of New York, they want to investigate properly whether Spider-Man is guilty or not. But the police officer had no proper evidence, so, they called Spider-Man’s best friend Ned Leeds, MJ, and his aunt May Parker for investigation.

After passing some time of investigation the police officers got confused because they are providing different types of answers for the same question. Finally, the police officer came up with a decision that they ask them only one question: “Is Peter Guilty or not?”. At first, they ask the question, Peter. If Peter says “Yes” then Peter is guilty. If Peter says “No” then they move on to others’ answers. If most of the others say that Peter is guilty then Peter is guilty otherwise he is not.


Though the police officers are weak in logical thinking so they ask for your help to write a program. That will take the answer for the question from Peter, Ned Leeds, MJ, and May Parker respectively as input and output if is Peter guilty or not.

Input

The input file will contain four integers A,B,C,D\bm {A,\: B,\: C, \:D} separated by spaces. Here A,B,C,D\bm {A,\: B, \:C, \:D} are the answers of Peter, Ned Leeds, MJ, and May Parker respectively. And all values of integers are either 0\bm 0 or 1\bm 1, where 1\bm 1 means yes\bm{yes} and 0\bm {0} means no\bm{no}.

Output

Print YES"\bm {“YES"} (without quotes) if Peter is guilty, otherwise print NO"\bm {“NO"} (without quotes).

Samples

InputOutput
1 0 1 0
YES
InputOutput
0 1 0 0
NO
InputOutput
0 1 0 1
YES

The output is case sensitive. Be careful about the newline ('\n') at the end.

Submit

Login to submit.

Statistics

83% Solution Ratio
abu_fayeemEarliest, Mar '22
sodiumfis_hFastest, 0.0s
abu_fayeemLightest, 131 kB
Marzuq01Shortest, 125B
Toph uses cookies. By continuing you agree to our Cookie Policy.