logo AlgoBeat OnlineJudge
登录 注册

#215793. [JAG 2024 Summer Camp #2] Half Plane Painting

内存限制:1024 MiB 时间限制:2000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

You have a 2D plane that is initially entirely white. You can perform the following operation any number of times:

  • Choose a line and the half-plane bounded by this line. Then, perform one of the following actions:
    • Paint the half-plane (excluding the boundary) black.
    • Paint the half-plane and the boundary white.

You are given the polygon with vertices, which is not necessarily convex. The vertices of are given in counterclockwise order as , , , , and the -th edge of connects vertex to vertex .

Determine whether it is possible to use the aforementioned operations to paint only the interior of polygon black, leaving everything else white.

输入格式

The input is given in the following format:

  • The vertices of polygon are given in counterclockwise order.
  • The edges of polygon do not share any points other than the vertices.
  • Each internal angle of polygon is not degrees.
  • All input values are integers.

输出格式

If it is possible to achieve the desired state with the operations, output Yes; otherwise, output No.

样例

样例输入 1

4
10 -5
2 -5
-7 6
-7 -8

样例输出 1

Yes

样例输入 2

12
17 1
19 3
12 10
19 17
17 19
10 12
3 19
1 17
8 10
1 3
3 1
10 8

样例输出 2

No