Hannibal is on a mission. He has to shoot a criminal. Hannibal was on the point (0, 0) and the criminal is on the point (Xc, Yc). But there is a wall between the point (X1, Y1) and (X2, Y2).
You have to tell whether Hannibal can shoot criminal or not.
INPUT:
First line contains the total number of test cases T. For each test case, a single line contains space separated integers denoting X1, Y1, X2, Y2, Xc, Yc.
OUTPUT:
For each test case display YES, if Hannibal can shoot the criminal. Otherwise, display NO.
Constraints:
1 <= T <= 100
1 <= X, Y <= 1000000
Sample Input

Hey! We 've verified this expert answer for you, click below to unlock the details :)

I got my questions answered at brainly.com in under 10 minutes. Go to brainly.com now for free help!

@Algorithmic

Yes, you calculate y=mx+b for the bullet path and the wall.

Looking for something else?

Not the answer you are looking for? Search for more explanations.