#include <iostream>
using namespace std;
int main() {
int a, b;
cin >> a >> b;
cout << max(0, (b - a))<< " "<< max(b, (b - a));
return 0;
}
I2luY2x1ZGUgPGlvc3RyZWFtPgp1c2luZyBuYW1lc3BhY2Ugc3RkOwoKaW50IG1haW4oKSB7CglpbnQgYSwgYjsKCWNpbiA+PiBhID4+IGI7Cgljb3V0IDw8IG1heCgwLCAoYiAtIGEpKTw8ICIgIjw8IG1heChiLCAoYiAtIGEpKTsKCXJldHVybiAwOwp9