Storks
Stepan and Marysia visited the zoo after school, where Stepan was particularly fascinated by the storks, especially their ability to sleep on one leg.
In the aviary, some storks stand on two legs while others stand on one. When a stork stands on one leg, its other leg is hidden. Stepan counted the visible legs of all the storks and noted the number as a.
A few minutes later, Marysia also counted the visible legs of the storks, as some might have changed their stance. She recorded the number as b.
After leaving the zoo, Stepan and Marysia wondered about the total number of storks in the aviary. They realized that determining this number precisely might not always be possible. They now wish to find out the minimum and maximum number of storks that could have been present.
Your task is to write a program that, given the numbers a and b, calculates the minimum and maximum number of storks that could have been in the aviary.
Input
The input consists of two integers a and b, separated by a space (1 ≤ a ≤ 10^9, 1 ≤ b ≤ 10^9).
Output
Output two integers, separated by a space, representing the minimum and maximum number of storks that could have been in the aviary. It is guaranteed that at least one solution exists.
Explanation of examples:
Consider the following scenarios:
1) There are two storks in the aviary. When Stepan counted the legs, one stork stood on two legs and the other on one, resulting in three visible legs. When Marysia counted, both storks stood on two legs, totaling four visible legs.
2) There are three storks in the aviary. When Stepan counted, all storks stood on one leg, showing three legs. When Marysia counted, one stork stood on two legs while the other two stood on one, showing four legs.