#include #include #include #include #include #include #include #include #include #include #include #include #include #include using namespace std; typedef long long int ll; typedef pair P; int main() { double x, y; cin>>x>>y; double mx=min(x, 1.0-y), mn=max(0.0, x-y); printf("%.10lf %.10lf\n", mx, mn); return 0; }