Industrial Nuclear Water
题号:NC222874
时间限制:C/C++/Rust/Pascal 1秒,其他语言2秒
空间限制:C/C++/Rust/Pascal 256 M,其他语言512 M
64bit IO Format: %lld

题目描述

Giant Kingdom creates tons of drinkable water, and will discharge the water into an ocean. The ocean can be simplified to a 3-dimensional space. Because of some magic, there are 3 surfaces, , and water can't pass through any of the surfaces. Baby Kingdom is worried about whether the drinkable water can reach their country.

Given are two coordinates (x_1,y_1,z_1),(x_2,y_2,z_2) indicate the position of Giant Kingdom and the position of Baby Kingdom. Please find out weather the drinkable water can reach Baby Kingdom. It is guaranteed that both countries do not located in any of the surfaces.

You need to answer  queries.

输入描述:

First line contains one integer  ().
Next  lines, the -th line contains 6 integers x_1,y_1,z_1,x_2,y_2,z_2 (), indicating the -th query.

输出描述:

 lines, in the -th line print `Yes` if the drinkable water can reach Baby Kingdom, print `No` otherwise.
示例1

输入

复制
3
1 0 0 2 0 0
1 0 0 -1 0 0
1 0 0 1 1 0

输出

复制
Yes
No
No

说明

In example, query 3, the surface divide(1,0,0),(1,1,0)_{} is 1000|y|=x^2+z^2.