#include <bits/stdc++.h>
#pragma comment(linker, "/STACK:16777216")
using namespace std;
int M, N, u[1001][1001];
double r[1001][1001], a11, a12, a21, a22, d, x, y;
double f(int m, int n) {
  if (!m) return r[m][n] = 1. / (n + 1);
  if (!n) return r[m][n] = 1.;
  if (u[m][n]++) return r[m][n];
  f(n, m - 1);
  f(n - 1, m);
  a11 = 1;
  a12 = 1 - r[n][m - 1];
  a21 = (1 - r[n - 1][m]) * n / (n + 1.);
  a22 = a21 + 1. / (n + 1.);
  d = (a11 - a21 - a12 + a22);
  x = (a22 - a21) / d;
  y = (a22 - a12) / d;
  return r[m][n] = x * (y * a11 + (1 - y) * a12) +
                   (1 - x) * (y * a21 + (1 - y) * a22);
}
int main() {
  scanf("%d %d", &M, &N);
  printf("%.10lf %.10lf\n", f(M, N), 1 - f(M, N));
  return 0;
}
