#include <bits/stdc++.h>
using namespace std;
double pd[2200][2200];
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  int N = max(n, m);
  pd[0][0] = 1;
  for (int i = 1; i <= N; i++) {
    pd[i][0] = 1;
  }
  for (int j = 1; j <= N; j++) {
    pd[0][j] = 1.0 / (j + 1);
  }
  for (int sum = 2; sum <= 2 * N; sum++) {
    for (int i = 1; i <= N; i++) {
      int j = sum - i;
      if (j < 1 || j > N) continue;
      pd[i][j] = 1.0 / (j + 1);
      double a = 1;
      double b = 1.0 - pd[j][i - 1];
      double c = j * (1.0 - pd[j - 1][i]) / (j + 1);
      double d = c + 1.0 / (j + 1);
      double p, q;
      if (fabs(a - b - c + d) < 1E-8) {
        p = 1;
        q = 1;
      } else {
        p = (d - c) / (a - b - c + d);
        q = (d - b) / (a - b - c + d);
      }
      pd[i][j] =
          max(pd[i][j], p * q * a + p * (1.0 - q) * b + (1.0 - p) * q * c +
                            (1.0 - p) * (1.0 - q) * d);
    }
  }
  printf("%.10lf %.10lf\n", pd[n][m], 1.0 - pd[n][m]);
  return 0;
}
