In a rectangular room W on H there is a rectangular table whose sides are

parallel to the sides of the room. The lower-left corner of the table is at the point

(x1, y1), and the upper-right corner is at the point (x2, y2). You want to put

another rectangular table with a width w and a height h in this room so that the side

corresponding to the width of the table is parallel to the side of the room

corresponding to its width. (tables can touch each other, but they cannot

have a common area).

What is the minimum distance to move the first table so

that a second table can be placed in the room? Turn the tables - forbidden. The calculations use the Cartesian (from Rene Descartes) system

coordinates.