EQBOX - Equipment Box

There is a large room in the Pyramid called Room-of-No-Return. Its floor is covered by rectangular tiles of equal size. The name of the room was chosen because of the very high number of traps and mechanisms in it. The ACM group has spent several years studying the secret plan of this room. It has made a clever plan to avoid all the traps. A specially trained mechanic was sent to deactivate the most feared trap called Shattered Bones. After deactivating the trap the mechanic had to escape from the room. It is very important to step on the center of the tiles only; he must not touch the edges. One wrong step and a large rock falls from the ceiling squashing the mechanic like a pancake. After deactivating the trap, he realized a horrible thing: the ACM plan did not take his equipment box into consideration. The box must be laid onto the ground because the mechanic must have both hands free to prevent contact with other traps. But when the box is laid on the ground, it could touch the line separating the tiles. And this is the main problem you are to solve.


The input consists of T test cases (T is equal to about 10000). The number of them (T) is given on the first line of the input file. Each test case consists of a single line. The line contains exactly four integer numbers separated by spaces: A, B, X and Y. A and Bindicate the dimensions of the tiles, X and Y are the dimensions of the equipment box (1 <= A,B,X,Y <= 50000).


Your task is to determine whether it is possible to put the box on a single tile -- that is, if the whole box fits on a single tile without touching its border. If so, you are to print one line with the sentence "Escape is possible.". Otherwise print the sentence "Box cannot be dropped.".


Sample Input:

10 10 8 8
8 8 10 10

Sample output:

Escape is possible.
Box cannot be dropped.
Warning: large Input/Output data, be careful with certain languages

hide comments
smso: 2023-03-03 16:38:21

One more useful testcase from forum:
100 50 105 9
Escape is possible.

sjfl0001: 2021-04-10 21:21:36

Lo hice con arreglo.

anikett: 2020-12-19 13:50:17

@himanshukm2301 It's not useless , it just test whether you know trigonometry or basic geometry. It's a nice question and I got WA many times because I missed fullstop in printf :(

Last edit: 2020-12-19 13:50:39
himanshukm2301: 2020-08-29 15:30:14

Useless Question!

Last edit: 2020-08-29 15:36:01
r0ck1n70sh: 2020-01-21 08:00:10

Can anyone tell about source of this problem? I'm just to know which kind of contests or competition it's originally asked?

aio: 2019-01-08 16:59:42

extra testcases:
10 10 10 10
Escape is possible

9 9 10 1
Escape is possible

skr2538: 2017-03-30 16:49:45

can anyne give me some test cases.its working fine in my ubuntu terminal but wrong answer in spoj.

weathervane: 2017-03-15 10:16:00

It would be better as "without crossing its edges" because the box may touch any part of the tile, and may reach its edges, despite wording to the contrary and lack of clear example. So a 10 x 10 box will fit on a 10 x 10 tile.

mkfeuhrer: 2016-07-06 06:37:51

first silly CE , then WA , read the comments (rotation possible!! ) solved generalised version AC finally:-)

qlstudio: 2016-04-30 17:31:35

it is A*B>=X*Y and not A>=X and B>=Y (NOT!)

Last edit: 2016-04-30 17:41:08

Added by:adrian
Time limit:5s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Resource:ACM Central European Programming Contest, Prague 1999