#P9203. Anniversary Relation Check
Anniversary Relation Check
Anniversary Relation Check
Given two real numbers (a) and (b), we say they satisfy the anniversary relation if and only if by performing the following two operations any number of times (possibly zero), we can make them equal:
- Add \(1\) to \(a\), i.e., \(a \gets a+1\);
- Add \(1\) to \(b\), i.e., \(b \gets b+1\).
In other words, the relation holds if there exist non-negative integers \(m\) and \(n\) such that \(a + m = b + n\). It can be shown that this condition is equivalent to \(a-b\) being an integer (or, equivalently, that the fractional parts of \(a\) and \(b\) are equal).
Determine if the two events satisfy the anniversary relation.
inputFormat
The input consists of a single line containing two real numbers (a) and (b), separated by spaces.
outputFormat
Output a single line containing Yes
if (a) and (b) satisfy the anniversary relation, and No
otherwise.
sample
1 2
Yes