#include using namespace std; using ll = long long; int main() { ios::sync_with_stdio(false), cin.tie(0); double x, y; cin >> x >> y; cout << fixed << setprecision(10) << min(x, 1 - y) << " " << max(x - y, .0) << endl; }