#include <bits/stdc++.h>
const int N = 1100;
double f[N][N];
void init(int x) {
  for (int i = 0; i <= x; i++) {
    f[i][0] = 1;
    f[0][i] = 1. / (i + 1);
  }
  for (int s = 2; s <= x + x; s++) {
    for (int i = 1; i <= x; i++) {
      int j = s - i;
      if (j < 1 || j > x) continue;
      double d = (1 - f[j - 1][i]) * j / (j + 1);
      double t = 1.0 / (j + 1);
      double x = t / (t + f[j][i - 1]);
      f[i][j] = (1 - d) * x + d;
      if (f[i][j] < t) f[i][j] = t;
    }
  }
}
int main() {
  int n, m, x;
  scanf("%d %d", &n, &m);
  x = n > m ? n : m;
  init(x);
  printf("%.10f %.10f\n", f[n][m], 1 - f[n][m]);
}
