#include <bits/stdc++.h>
const int N = 1010;
int n, m;
double f[N][N];
void dfs(int i, int j) {
  if (!i || !j || f[i][j] > 1e-9) return;
  dfs(j, i - 1), dfs(j - 1, i);
  double p = 1 / ((j + 1) * f[j][i - 1] + 1);
  f[i][j] = j / (j + 1.0) * (1 - f[j - 1][i]) * (1 - p) + p;
}
int main() {
  scanf("%d%d", &n, &m);
  for (int i = 0; i <= (n > m ? n : m); ++i)
    f[i][0] = 1, f[0][i] = 1.0 / (i + 1);
  dfs(n, m);
  printf("%.10f %.10f", f[n][m], 1 - f[n][m]);
  return 0;
}
