Maya likes the kings of Persia. She wanted to know how long her favourite kings lived, so she started looking up records.
Exact birth years and death years survive for only a few of them. For the rest she found a range of years in which the birth happened and a range of years in which the death happened. Cyrus II was born between 600 BC and 575 BC and died in 530 BC, so he lived 45 years at the least and 70 years at the most.
Maya's list of birth ranges and death ranges is far too long to work through by hand. Read the list for her and report the smallest and the largest possible age of each king.
If a king was born in year x and died in year y, he lived y−x years.
The input holds one test case per line. Each test case is four integers a, b, c, d (−5000≤a≤b≤c≤d≤2000). [a,b] is the range of the birth year and [c,d] is the range of the death year. A negative year means BC. The input ends with a line of four zeros, which is not a test case.
For each test case print the smallest age and the largest age on one line, separated by a space.
Year 0 does not exist in the real calendar, but this problem treats it as a real year.