#P15085. [UOI 2025 II Stage] Family
[UOI 2025 II Stage] Family
题目描述
The friends of Vus the Cossack: Fedir and Ksenia --- twins in a large family.
One day, during a lunch break, Vus asked the twins to tell something about their family. Fedir said that he has brothers and sisters, while Ksenia has brothers and sisters.
Vus the Cossack remembered these four numbers, but he forgot who among the twins answered first.
That is, remembering that four numbers were mentioned, he is not sure whether is Fedir's answer or Ksenia's. However, he is sure that and denote brothers, while and denote sisters.
Vus became curious about how many brothers and sisters there are in their family in total, so with these four numbers, he turned to you for help.
输入格式
The first line contains four integers , , , and (; ; ) --- the responses of the twins.
It is guaranteed that a solution exists.
输出格式
In a single line, output two integers --- the number of brothers and sisters in the family, respectively.
1 5 2 4
2 5
10 6 9 7
10 7