Codeforces Beta Round 58
A
A Student's Dream
Codeforces
1300
原题
←B →
翻译中…

Statistics claims that students sleep no more than three hours a day. But even in the world of their dreams, while they are snoring peacefully, the sense of impending doom is still upon them.

翻译中…

A poor student is dreaming that he is sitting the mathematical analysis exam. And he is examined by the most formidable professor of all times, a three times Soviet Union Hero, a Noble Prize laureate in student expulsion, venerable Petr Palych.

翻译中…

The poor student couldn't answer a single question. Thus, instead of a large spacious office he is going to apply for a job to thorium mines. But wait a minute! Petr Palych decided to give the student the last chance! Yes, that is possible only in dreams.

翻译中…

So the professor began: "Once a Venusian girl and a Marsian boy met on the Earth and decided to take a walk holding hands. But the problem is the girl has $*a*_{*l*}$ fingers on her left hand and $*a*_{*r*}$ fingers on the right one. The boy correspondingly has $*b*_{*l*}$ and $*b*_{*r*}$ fingers. They can only feel comfortable when holding hands, when no pair of the girl's fingers will touch each other. That is, they are comfortable when between any two girl's fingers there is a boy's finger. And in addition, no three fingers of the boy should touch each other. Determine if they can hold hands so that the both were comfortable."

翻译中…

The boy any the girl don't care who goes to the left and who goes to the right. The difference is only that if the boy goes to the left of the girl, he will take her left hand with his right one, and if he goes to the right of the girl, then it is vice versa.

翻译中…

Input

翻译中…

The first line contains two positive integers not exceeding $100$. They are the number of fingers on the Venusian girl's left and right hand correspondingly. The second line contains two integers not exceeding $100$. They are the number of fingers on the Marsian boy's left and right hands correspondingly.

翻译中…

Output

翻译中…

Print YES or NO, that is, the answer to Petr Palych's question.

翻译中…

Note

翻译中…

The boy and the girl don't really care who goes to the left.

翻译中…

样例

Input #1
5 1
10 5
Output #1
YES
InputCopy OutputCopy
Input #2
4 5
3 3
Output #2
YES
InputCopy OutputCopy
Input #3
1 2
11 6
Output #3
NO
InputCopy OutputCopy
题目信息
题号
62A
时间限制
2 s
内存限制
256 MB
标签
贪心
数学

题面与样例版权归 Codeforces 及出题人所有;中文翻译由 AI 生成(CI 管线),如有出入请以原文为准。