Every autumn the organizers of the Southwestern Europe Dice Simulation Contest are busy again. This year you must simulate a 3-sided die that produces each of three outcomes — written $1$, $2$, and $3$ — with prescribed probabilities, using three dice from a given set. The simulation works like this: pick one of the three given dice at random, roll it, and report its outcome. You are free to choose the probability of picking each of the three dice, as long as every one of those probabilities is strictly greater than zero. Before handing out the materials, the organizers must check that the task is actually solvable.
For instance, suppose you must simulate a die that yields outcomes $1$, $2$, and $3$ with probabilities $3/10$, $4/10$, and $3/10$, and you are given three dice where the $i$-th die always yields outcome $i$. Then you can reproduce the target die by picking the first die with probability $3/10$, the second with probability $4/10$, and the third with probability $3/10$.
The input consists of several test cases, separated by single blank lines. Each test case has four lines: the first three describe the three dice you are given, and the last describes the die you must simulate. Each of the four lines contains three space-separated integers between $0$ and $10000$ inclusive. The three numbers on a line add up to $10000$ and equal $10000$ times the probability that the die on that line yields outcome $1$, $2$, and $3$, respectively.
The input ends with a line containing the number zero three times (also preceded by a blank line).
For each test case, print a line containing YES if the desired die can be produced from the given dice, or NO otherwise.