P25387 [AtCoder] Ajihon
普及
题目描述

Problem Description

Hanima-kun decided to host a programming camp. There are $ N $ participants, and $ N $ is a multiple of $ 3 $.

Among competitive programmers, a reference book called "Ajihon" is widely popular. A pre-camp survey revealed that $ A $ people brought Ajihon to the camp.

During the camp, teams of $ 3 $ people each will be formed, resulting in $\dfrac{N}{3}$ teams. In these teams, you need to find the minimum and maximum number of teams that have at least one person with Ajihon.

Input Format

The input is given from the standard input in the following format:

$N\ A$

Output Format

Output the minimum and maximum number of teams that have at least one person with Ajihon, in this order, separated by a space in one line.

Sample Input and Output

Sample Input #1

6 2

Sample Output #1

1 2

Sample Input #2

9 6

Sample Output #2

2 3

Sample Input #3

81 0

Sample Output #3

0 0

Notes/Hints

Constraints

  • $3\le\ N\le\ 99$
  • $0\le\ A\le\ N$
  • $ N $ is a multiple of $ 3 $
  • $ A $ is an integer

Sample Explanation 1

If the $ 2 $ people with Ajihon are in the same team, the number of teams with Ajihon is $ 1 $. If they are in different teams, the number of teams with Ajihon is $ 2 $.

输入格式

见题面 Input 部分

输出格式

见题面 Output 部分

样例输入
6 2
样例输出
1 2