Equipment Box

Time limit1sMemory limit128 MB

Summary
Determine whether a rectangular box of given dimensions can be rotated and placed strictly inside a rectangular tile of given dimensions without touching its border.
Level

Medium6 of 10

Topics
Geometry, Binary search, Math
Solved
No attempts yet

Problem

Deep inside a pyramid lies a huge chamber called the Room-of-No-Return, whose floor is paved with rectangular tiles of equal size. The room owes its name to the many traps and mechanisms hidden inside it. A specially trained mechanic is sent in to deactivate the most feared trap, Shattered Bones, and then escape.

The mechanic may step only on the exact center of a tile. If he ever touches a line separating two tiles, a huge rock drops from the ceiling and crushes him. After deactivating the trap, he must put his equipment box down on the floor so that both hands stay free for the remaining traps. The box must rest entirely inside a single tile and must not touch any line that separates the tiles.

The box may be placed at any orientation, that is, it can be rotated to any angle. Given the size of a tile and the size of the box, decide whether the box can be placed so that it lies strictly inside one tile.

Input

The first line contains the number of test cases T.

Each of the next T lines describes one test case and contains exactly four integers separated by spaces: A, B, X, and Y. Here A and B are the side lengths of a tile, and X and Y are the side lengths of the equipment box, with 1 <= A, B, X, Y <= 50000.

Output

For each test case, decide whether the whole box can be placed on a single tile so that it fits strictly inside the tile without touching the tile's border. The box may be rotated to any angle.

If it is possible, print a single line containing Escape is possible. Otherwise, print a single line containing Box cannot be dropped.

Examples2

  1. Example 1

    Input
    2
    10 10 8 8
    8 8 10 10
    
    Expected output
    Escape is possible.
    Box cannot be dropped.
    
  2. Example 2

    Input
    1
    8 8 10 1
    
    Expected output
    Escape is possible.