Right Triangles
Hard
Execution time limit is 1 second
Runtime memory usage limit is 64 megabytes
Input
You are given 8 integers: x_1, y_1, a_1, b_1, x_2, y_2, a_2, b_2. Here, (x_1, y_1) represents the right-angle vertex of the first triangle, with the other two vertices located at (x_1+a_1, y_1) and (x_1, y_1+b_1). Similarly, (x_2, y_2) is the right-angle vertex of the second triangle, with its other vertices at (x_2+a_2, y_2) and (x_2, y_2+b_2). Each of these numbers can be zero and does not exceed 10^9 in absolute value.
Output
Output YES if Petro has concreted at least one point that was asphalted, and NO otherwise.
Examples
Input #1
Answer #1
Submissions 361
Acceptance rate 3%