#C9043. Determine Tennis Serve Zone

    ID: 53093 Type: Default 1000ms 256MiB

Determine Tennis Serve Zone

Determine Tennis Serve Zone

You are given coordinates representing a rectangular serve zone and the coordinates of where a tennis serve lands. The rectangle is defined by two opposite corners. Note that the given two corners may not be in order: one might not actually be the top-left or bottom-right.

Your task is to determine if the serve landed Inside the rectangular area (strictly inside, not on the edge), exactly on the Border (the edge of the rectangle) or completely Outside the zone.

Mathematically, given six integers \(x_1, y_1, x_2, y_2, x_t, y_t\), you should interpret \((x_1, y_1)\) and \((x_2, y_2)\) as two opposite corners of the rectangle. After reordering the coordinates so that \(x_1 \le x_2\) and \(y_1 \ge y_2\), the point \((x_t, y_t)\) is:

  • Inside if \(x_1 < x_t y_t > y_2\).
  • Border if \(x_t\) or \(y_t\) lies exactly on the edge defined by the rectangle (and the other coordinate is in its valid range).
  • Outside otherwise.

inputFormat

The input consists of a single line containing six space-separated integers: (x_1), (y_1), (x_2), (y_2), (x_t), (y_t).

outputFormat

Output a single word: either "Inside", "Border", or "Outside", indicating the position of the serve relative to the rectangular zone.## sample

1 4 6 1 3 3
Inside

</p>