logo AlgoBeat OnlineJudge
登录 注册

#215218. [UOI 2025 II Stage] Family

内存限制:512 MiB 时间限制:1000 ms 标准输入输出
题目类型:VJudge(洛谷) 评测方式:VJudge
上传者: 匿名

题目描述

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

1 5 2 4

样例输出 1

2 5

样例输入 2

10 6 9 7

样例输出 2

10 7