Promotion Counting

From the before and after head counts in the four divisions, recover the number promoted across each of the three boundaries.

Easy2MathNo attempts yetTime limit2sMemory limit512 MB

Problem

Bessie the cow helps Farmer John run the USA Cow Olympiad (USACO), an online contest where participants answer hard bovine trivia questions to prove what they know.

As participant backgrounds grew more varied, Farmer John split the contest into four divisions: bronze, silver, gold, and platinum. Every new participant starts in bronze, and any time someone scores perfectly on a contest they move up to the next division. A participant can even be promoted several times within the same contest. Farmer John keeps a list of all participants and their current divisions so that everyone starts at the right level whenever he holds a contest.

When he publishes the results of the most recent contest, Farmer John wants to include how many participants were promoted from bronze to silver, from silver to gold, and from gold to platinum. He forgot to count the promotions while the contest was running. Bessie realized that the number of participants in each division before and after the contest is enough to recover those counts. Do that computation for her.

Input

The input has four lines. Each line holds two integers between 0 and 1,000,000, separated by a space.

The first line gives the number of bronze participants before and after the contest, the second line gives the silver counts, the third line the gold counts, and the fourth line the platinum counts.

The input describes a contest that really could have happened, so all three promotion counts are at least 0.

Output

Print three lines, each with a single integer.

The first line is the number of participants promoted from bronze to silver, the second line the number promoted from silver to gold, and the third line the number promoted from gold to platinum.

Note

Suppose one participant sat in each of the four divisions before the contest, and afterwards bronze and platinum hold two participants each while silver and gold hold one each. One way to reach those counts is that two new participants registered during the contest, one of them climbed all the way to platinum, and the other stayed in bronze.