Consider a pair of integers, (a, b). The following operations can be performed on (a, b) in any order, zero or more times:
For example, starting with (1, 1) perform the operation (1, 1 + 1) to get (1, 2) perform the operation (1 + 2, 2) to get (3, 2), and perform the oepration (3 + 2, 2) to get (5, 2). Alternatively, the first operation could be (1 + 1, 1) to get (2, 1) and so on. The diagram below demonstrates the example representing the pairs as Cartesian coordinates: see image.
Complete the function isPossible in the editor below. The function must return a string that denotes whether or not you can convert (a, b) to (c, d) by performing zero or more of the operations specified above. If it is possible, return the string Yes. Otherwise, return No.
isPossible has the following parameter(s):
a: an integer
b: an integer
c: an integer
d: an integer
Constraints
1 <= a, b, c, d <= 1000
Input Format for Custom Testing
Input from stdin will be processed as follows and passed to the function.
Sample Case 0
Sample input 0
1
4
5
9
Sample Output 0
Yes
Explanation 0
Figure: see image.
Convert (1, 4) to (5, 9) by performing the following sequence of operations: (1, 4) -> (5, 4) -> (5, 9)