#include using namespace std; typedef long long int ll; typedef pair pii; typedef vector vi; typedef vector > vii; #define rrep(i, m, n) for(int (i)=(m); (i)<(n); (i)++) #define rep(i, n) for(int (i)=0; (i)<(n); (i)++) #define rev(i, n) for(int (i)=(n)-1; (i)>=0; (i)--) #define vrep(i, c) for(__typeof((c).begin())i=(c).begin(); i!=(c).end(); i++) #define ALL(v) (v).begin(), (v).end() #define mp make_pair #define pb push_back template inline void minup(T1& m, T2 x){ if(m>x) m=static_cast(x); } template inline void maxup(T1& m, T2 x){ if(m(x); } #define INF 1000000000 #define MOD 1000000009 #define EPS 1E-9 double x, y; int main() { cin >> x >> y; if(x < EPS || 1-y < EPS) puts("0 0"); else printf("%.10f %.10f\n", abs(min(1.0, x) - 1.0) < EPS ? 1 : min(1.0, x)/(x*(1-y)), abs(max(0.0, x-y) - 0.0) < EPS ? 0 : max(0.0, x-y)/(x*(1-y))); return 0; }