#K62282. Can Place Rectangle on Screen
Can Place Rectangle on Screen
Can Place Rectangle on Screen
You are given a screen with dimensions \(a\) by \(b\) and an application icon with dimensions \(x\) by \(y\). The icon may be rotated by 90° (swapping \(x\) and \(y\)). Your task is to determine if the icon can be placed on the screen in a single placement, i.e. if it fits in either orientation.
In other words, output \(YES\) if either \(x \le a\) and \(y \le b\) holds, or if \(y \le a\) and \(x \le b\) holds; otherwise, output \(NO\). Use LaTeX formatting for the formulas.
inputFormat
The first line contains an integer \(t\) (the number of test cases). Each of the next \(t\) lines contains four space-separated integers \(a\), \(b\), \(x\), \(y\) representing the screen dimensions and the icon dimensions respectively.
outputFormat
For each test case, output a single line with either \(YES\) or \(NO\) indicating whether the icon can be placed on the screen.
## sample1
5 5 3 2
YES
</p>