# 7407：Rent an apartment

###### 题目描述
SSPUer wants to rent an apartment on Jinhai Road near SSPU. There are n apartments that are numbered from 1 to n and are arranged in a row. Two apartments are adjacent if their indices differ by 1. Some of the apartments can already be inhabited, others are available for rent.

SSPUer often visits his neighbors, so apartment is good for him if it is available for rent and there is at least one already inhabited apartment adjacent to it. SSPUer knows that there are exactly k already inhabited apartments, but he doesn't know their indices yet.

Find out what could be the minimum possible and the maximum possible number of apartments that are good for SSPUer.

###### 输入解释
The only line of the input contains two integers: n and k (1 ≤ n ≤ 10^9, 0 ≤ k ≤ n).
###### 输出解释
Print the minimum possible and the maximum possible number of apartments good for SSPUer.
###### 输入样例
6 3
###### 输出样例
1 3
###### 提示
In the sample test, the number of good apartments could be minimum possible if, for example, apartments with indices 1, 2 and 3 were inhabited. In this case only apartment 4 is good. The maximum possible number could be, for example, if apartments with indices 1, 3and 5 were inhabited. In this case all other apartments: 2, 4 and 6 are good.

 时间上限 内存上限 1000 MS 128 MB