+ محدودیت زمان: ۱ ثانیه
+ محدودیت حافظه: ۲۵۶ مگابایت
----------
![توضیح تصویر](https://quera.org/qbox/view/UVvEZQeUxY/J.png)
Shamir’s birthday party will be held soon and for this big event, he bought $N$ cakes (YES!!! he bought them from BB). He didn’t have enough space in his house, so he brought them to ACM room. Shamir left ACM room for a minute, meanwhile Fata showed up! Fata is always hungry, there is nothing that can fill that void (that’s what he says about his stomach!). Fata saw cakes and became very happy for the situation and thanked god for his delightful blessing and started picking. After a while it wasn’t
picking anymore, he was literally cutting cakes. All of a sudden he remembered that there is a Newbies Contest coming up and he’s one of the problem setters, so he forgot about eating and started thinking about problems of the contest and cakes that will be dealt among the contest and drinks and $\dots$ so he left the room. When Shamir returned to the ACM room and saw cakes, he realised it’s Fata’s job. No one knows why, but Shamir wants to replace cakes that Fata picked on. Shamir doesn’t remember shapes of every cake so there is only one way for him to find out if a cake is picked on by Fata or not. Shamir remembers that all cakes were shaped as convex *polygons*(A plane figure with at least three straight sides and angles, and typically five or more), so if a cake is not *convex* (A polygon such that no side extended cuts any other side or vertex; it can be cut by a straight line in at most two points) anymore, Fata picked on that cake. Shamir is busy celebrating so he asked you for help.
This picture illustrates the shape of cake, before and after Fata shows up.!
![توضیح تصویر](https://quera.org/qbox/view/8YcVn5cupg/J_2.png)
# ورودی
In first line of the input will be an integer $N (1 ≤ N ≤ 20)$ indicating number of cakes. Each Cake is described by it’s corner points and shaped as a polygon. For each cake there is an integer $M (3 ≤ M ≤ 100)$ indicating number of cake’s corner points. Following $M$ lines, contain details of cake’s corner points in clockwise order. Each point is consisted of two integers $xi , yi (0 < xi , yi ≤ 10,000)$. It’s guaranteed there are not three points in a line.
# خروجی
For every cake given in input, output a line containing “Case $X$: ” (quotations for clarify) which $X$ is number of the test case and print “$YES$” or “$NO$” indicating $i$’th cake was picked on by Fata or not. if yes, then print “$YES$” otherwise print “$NO$” (quotes for clarify).
# مثالها
## ورودی نمونه ۱
```
1
3
6 2
1 1
3 5
```
## خروجی نمونه ۱
```
Case 1: NO
```
ارسال پاسخ برای این سؤال
در حال حاضر شما دسترسی ندارید.