P29941 [洛谷] Temporal "Curse of Tsukiyomi-no-Ookami"
普及-
题目描述

Problem Background

The elixir of Penglai, the cursed elixir of immortality.

Tsukiyomi-no-Ookami, tasked with destroying the elixir of Penglai by throwing it into Mount Fuji, ultimately decided to throw it into Mount Yatsugatake instead. On the way down the mountain, Meitong kicked him down, seizing the elixir of Penglai.

That was a thousand years ago.

Problem Description

The times of two events occurring can be considered as two real numbers \(a, b\). We say that the two events satisfy the "anniversary" relationship if and only if they can be made equal by performing the following two operations (zero or more times):

  • Add 1 to \(a\), i.e., \(a \gets a + 1\);
  • Add 1 to \(b\), i.e., \(b \gets b + 1\).

Given the real numbers \(a, b\), inquire whether they satisfy the "anniversary" relationship.

Input Format

The input consists of a single line with two real numbers \(a, b\). The input is accurate to 12 decimal places.

Output Format

The output consists of a single line. If there is a valid solution, output YES; otherwise, output NO.

Sample Input and Output

Sample Input #1

100.000000000000 999999.000000000000

Sample Output #1

YES

Sample Input #2

114.123456789000 514.123456789000

Sample Output #2

YES

Sample Input #3

0.333333333333 0.333333333334

Sample Output #3

NO

Notes

For all data, it is guaranteed that \(0 < a, b \le 10^9\).

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
100.000000000000 999999.000000000000
样例输出
YES