#include <bits/stdc++.h>
using namespace std;
int n, m;
double prob[1001][1001];
int main() {
  for (int k = 0; k <= 2000; ++k)
    for (int i = max(0, k - 1000); i <= min(1000, k); ++i) {
      int j = k - i;
      prob[i][j] = 1.0 / (1.0 + j);
      if (i > 0 && j > 0) {
        double bluff = 1.0 / (prob[j][i - 1] * (j + 1.0) + 1.0);
        prob[i][j] =
            max(prob[i][j],
                bluff + (1.0 - bluff) * j / (j + 1.0) * (1.0 - prob[j - 1][i]) +
                    min(0.0, (1.0 - bluff) / (j + 1.0) -
                                 bluff * bluff * prob[j][i - 1]));
      }
    }
  cin >> m >> n;
  cout << setprecision(12) << prob[m][n] << ' ' << (1 - prob[m][n]) << endl;
}
