Problem hidden
This problem was hidden by Editorial Board member probably because it has incorrect language version or invalid test data, or description of the problem is not clear.

HS10CXQL - Convex Quadrilaterals

Given coordinates of 4 points on the plane compute if they are vertices of a convex quadrilateral.

Input data specification

First t, the number of test cases. In the each of the following t lines 8 positive integers x1, y1, x2, y2, x3, y3, x4, y4 ≤ 1000 - the coordinates of 4 points: (x1, y1), (x2, y2), (x3, y3), (x4, y4).

Output data specification

For each test in the separate line one character

  • Y, if given points are vertices of convex quadrilateral.
  • N, in the opposite case.

 

Example

Input:
5
100 100 100 200 200 200 200 100
630 421 326 242 561 432 478 332
378 212 380 550 840 735 379 381
591 916 765 191 487 490 678 554
975 75 324 166 343 28 650 120

Output:
Y
N
N
Y
N

Scoring

Solving this problem you score 10 points.


Added by:kuszi
Date:2011-01-29
Time limit:1s
Source limit:50000B
Memory limit:1536MB
Cluster: Cube (Intel G860)
Languages:All except: CLOJURE ICK PERL6
Resource:High School Programming League 2010/11

© Spoj.com. All Rights Reserved. Spoj uses Sphere Engine™ © by Sphere Research Labs.