{"trustable":true,"sections":[{"title":"","value":{"format":"HTML","content":"Once upon a time when people still believed in magic, there was a great wizard Aranyaka Gondlir. After twenty years of hard training in a deep forest, he had finally mastered ultimate magic, and decided to leave the forest for his home. \r\u003cbr\u003eArriving at his home village, Aranyaka was very surprised at the extraordinary desolation. A gloom had settled over the village. Even the whisper of the wind could scare villagers. It was a mere shadow of what it had been.\r\u003cbr\u003e\r\u003cbr\u003eWhat had happened? Soon he recognized a sure sign of an evil monster that is immortal. Even the great wizard could not kill it, and so he resolved to seal it with magic. Aranyaka could cast a spell to create a monster trap: once he had drawn a line on the ground with his magic rod, the line would function as a barrier wall that any monster could not get over. Since he could only draw straight lines, he had to draw several lines to complete a monster trap, i.e., magic barrier walls enclosing the monster. If there was a gap between barrier walls, the monster could easily run away through the gap.\r\u003cbr\u003e\r\u003cbr\u003eFor instance, a complete monster trap without any gaps is built by the barrier walls in the left figure, where \"M\" indicates the position of the monster. In contrast, the barrier walls in the right figure have a loophole, even though it is almost complete.\r\u003cbr\u003e\u003ccenter\u003e\u003cimg src\u003d\"CDN_BASE_URL/43cdd715fb605458f77f059acd0c9d9b?v\u003d1713475375\"\u003e\u003c/center\u003e\r\u003cbr\u003eYour mission is to write a program to tell whether or not the wizard has successfully sealed the monster."}},{"title":"Input","value":{"format":"HTML","content":"The input consists of multiple data sets, each in the following format.\r\u003cbr\u003e\r\u003cbr\u003en\r\u003cbr\u003ex1 y1 x01 y01\r\u003cbr\u003ex2 y2 x02 y02\r\u003cbr\u003e. . .\r\u003cbr\u003exn yn x0n y0n\r\u003cbr\u003e\r\u003cbr\u003eThe first line of a data set contains a positive integer n, which is the number of the line segments drawn by the wizard. Each of the following n input lines contains four integers x, y, x0, and y0, which represent the x- and y-coordinates of two points (x, y) and (x0, y0) connected by a line segment. You may assume that all line segments have non-zero lengths. You may also assume that n is less than or equal to 100 and that all coordinates are between -50 and 50, inclusive. For your convenience, the coordinate system is arranged so that the monster is always on the origin (0, 0). The wizard never draws lines crossing (0, 0).\r\u003cbr\u003e\r\u003cbr\u003eYou may assume that any two line segments have at most one intersection point and that no three line segments share the same intersection point. You may also assume that the distance between any two intersection points is greater than 10^-5.\r\u003cbr\u003e\r\u003cbr\u003eAn input line containing a zero indicates the end of the input.\r\u003cbr\u003e"}},{"title":"Output","value":{"format":"HTML","content":"For each data set, print \"yes\" or \"no\" in a line. If a monster trap is completed, print \"yes\". Otherwise, i.e., if there is a loophole, print \"no\"."}},{"title":"Sample","value":{"format":"HTML","content":"\u003ctable class\u003d\u0027vjudge_sample\u0027\u003e\n\u003cthead\u003e\n \u003ctr\u003e\n \u003cth\u003eInput\u003c/th\u003e\n \u003cth\u003eOutput\u003c/th\u003e\n \u003c/tr\u003e\n\u003c/thead\u003e\n\u003ctbody\u003e\n \u003ctr\u003e\n \u003ctd\u003e\u003cpre\u003e8\r\n-7 9 6 9\r\n-5 5 6 5\r\n-10 -5 10 -5\r\n-6 9 -9 -6\r\n6 9 9 -6\r\n-1 -2 -3 10\r\n1 -2 3 10\r\n-2 -3 2 -3\r\n8\r\n-7 9 5 7\r\n-5 5 6 5\r\n-10 -5 10 -5\r\n-6 9 -9 -6\r\n6 9 9 -6\r\n-1 -2 -3 10\r\n1 -2 3 10\r\n-2 -3 2 -3\r\n0\r\n\u003c/pre\u003e\u003c/td\u003e\n \u003ctd\u003e\u003cpre\u003eyes\r\nno\u003c/pre\u003e\u003c/td\u003e\n \u003c/tr\u003e\n\u003c/tbody\u003e\n\u003c/table\u003e\n"}}]}