#include using namespace std; using LL = long long; using ULL = unsigned long long; #define rep(i,n) for(int i=0; i<(n); i++) int main() { double X, Y; cin >> X >> Y; Y = 1. - Y; cout << fixed << setprecision(10); cout << min(X, Y) << " " << max(X + Y - 1., 0.) << endl; return 0; }