Description

在x-y平面上,給你一些矩形和一些點,請你回答這些點落在哪些矩形內(如果有的話)。另外,在這個問題中,剛好落在邊上的點不視為落在該矩形內。

Given a list of rectangles and a list of points in the x-y plane, determine for each point which figures (if any) contain the point.

Input

首先是矩形的資料,每個矩形一列,第1個字元代表圖形的類別(r 代表矩形),接下來有4個數值分別代表該矩形左上角及右下角的座標。矩形的個數不會超過10個。

以一列僅含有一個*代表矩形資料結束。

接下來的每列為一個點的座標,也就是要測試的點。若點座標為9999.9 9999.9代表輸入結束(此點不需輸出)

There will be n(≤ 10) rectangles descriptions, one per line. The first character will designate the type of figure (“r” for rectangle). This character will be followed by four real values designating the x-y coordinates of the upper left and lower right corners.

The end of the list will be signalled by a line containing an asterisk in column one.

The remaining lines will contain the x-y coordinates, one per line, of the points to be tested. The end of this list will be indicated by a point with coordinates 9999.9 9999.9; these values should not be included in the output.

Points coinciding with a figure border are not considered inside.

Output

對每一個測試的點,若其落在某矩形內,則輸出下列格式的訊息:

Point i is contained in figure j

如果某個點沒有落在任何矩形內,則輸出:

Point i is not contained in any figure

請注意:點和矩形的編號是按照他們出現在input的順序。請參考Sample Output

For each point to be tested, write a message of the form:

Point i is contained in figure j