#include <iostream>
#include <cmath>
#include <algorithm>
#include <vector>
using namespace std;
int main(){
int n, k;
cin >> n >> k;
if(n > 0 && k > 0 && n > k) {
cout << 1 << ' ' << min(k * 2, n - k);
}
else cout << 0 << ' ' << 0;
return 0;
}


京公网安备 11010502036488号