Little Rabbit is a magic rabbit living in human society. He drinks magic potion every day to disguise himself as a human. To make the potion, Little Rabbit needs to find two kinds of magic material, USAO and Camellia, and dissolve them in water.
One day, Little Rabbit wants to make some potion, but he's surprised to find that the materials are all used up, including the magic materials and the water. Luckily, Little Rabbit still has

bottles of ready-made potion. The potion in the first bottle has

mg/ml of USAO and

mg/ml of Camellia. The potion in the second bottle has

mg/ml of USAO and

mg/ml of Camellia. The potion in the third bottle has

mg/ml of USAO and

mg/ml of Camellia. We can assume that there's enough potion in the bottles.
Little Rabbit wants to know whether he can make a kind of potion that has

mg/ml of USAO and

mg/ml of Camellia with the help of the

bottles of ready-made potion.
输入描述:
The first line of the input contains two integers
and
(
), indicating that the potion in the first bottle has
mg/ml of USAO and
mg/ml of Camellia.
The second line of the input contains two integers
and
(
), indicating that the potion in the second bottle has
mg/ml of USAO and
mg/ml of Camellia.
The third line of the input contains two integers
and
(
), indicating that the potion in the third bottle has
mg/ml of USAO and
mg/ml of Camellia.
The fourth line contains an integer
(
), indicating the number of Little Rabbit's queries.
In the next
lines, each line contains two integers
and
(
), indicating that Little Rabbit wants to know whether he can make a kind of potion that has
mg/ml of USAO and
mg/ml of Camellia.
输出描述:
For each query, if Little Rabbit is able to make the potion, output YES in a single line, otherwise output NO in a single line.