题目描述
Problem Description
We conducted a survey on newspaper subscriptions. Specifically, we asked each of the $ N $ respondents the following two questions:
- Question 1: Do you subscribe to newspaper X?
- Question 2: Do you subscribe to newspaper Y?
The results showed that $ A $ people answered "yes" to Question 1, and $ B $ people answered "yes" to Question 2.
At this point, what is the maximum and minimum number of people who subscribe to both newspapers X and Y among the survey respondents?
Write a program to answer this question.
Input Format
The input is given from the standard input in the following format:
$ N $ $ A $ $ B $
Output Format
Output the maximum and minimum number of people who subscribe to both newspapers, in this order, separated by a space.
Sample Input and Output
Sample Input #1
10 3 5
Sample Output #1
3 0
Sample Input #2
10 7 5
Sample Output #2
5 2
Sample Input #3
100 100 100
Sample Output #3
100 100
Notes/Hints
Constraints
- $1 \leq N \leq 100$
- $0 \leq A \leq N$
- $0 \leq B \leq N$
- All input values are integers.
Sample Explanation 1
In this example, out of the $ 10 $ respondents, $ 3 $ people answered that they subscribe to newspaper X, and $ 5 $ people answered that they subscribe to newspaper Y. At this point, the number of people who subscribe to both newspapers is at most $ 3 $ and at least $ 0 $.
Sample Explanation 2
In this example, out of the $ 10 $ respondents, $ 7 $ people answered that they subscribe to newspaper X, and $ 5 $ people answered that they subscribe to newspaper Y. At this point, the number of people who subscribe to both newspapers is at most $ 5 $ and at least $ 2 $.
输入格式
见题面 Input 部分
输出格式
见题面 Output 部分