#P9203. 时效「月岩笠的诅咒」

时效「月岩笠的诅咒」

Background

The Hourai Elixir, a cursed elixir of immortality.

Tsukiiwakasa, who was ordered to throw the Hourai Elixir into Mount Fuji to destroy it, eventually planned to throw the Hourai Elixir into the Yatsugatake Mountains instead. On the way down the mountain, Mokou kicked it down the slope and seized the Hourai Elixir.

That was already a thousand years ago.

Problem Description

The times at which two events happened on the timeline can be viewed as two real numbers a,ba, b. We say the two events satisfy the “anniversary” relation if and only if we can make them equal by performing the following two operations (possibly 00 times):

  • Add 11 to aa, i.e., aa+1a \gets a + 1.
  • Add 11 to bb, i.e., bb+1b \gets b + 1.

Now you are given real numbers a,ba, b. Determine whether they satisfy “anniversary”.

Input Format

The input consists of one line with two real numbers a,ba, b. The input is given with exactly 1212 digits after the decimal point.

Output Format

Output one line. If a valid way exists, output YES\verb!YES!; otherwise output NO\verb!NO!.

100.000000000000 999999.000000000000

YES
114.123456789000 514.123456789000

YES
0.333333333333 0.333333333334

NO

Hint

For all testdata, it is guaranteed that 0<a,b1090 < a, b \le 10^9.

Translated by ChatGPT 5