#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
double f[MAXN][MAXN];
bool flag[MAXN][MAXN];
int n, m;
double dfs(int n, int m) {
  if (flag[n][m]) return f[n][m];
  flag[n][m] = 1;
  if (!n) return f[n][m] = 1.0 / (m + 1);
  if (!m) return f[n][m] = 1.0;
  double a = 1, b = 1 - dfs(m, n - 1);
  double c = (1 - dfs(m - 1, n)) * m / (m + 1),
         d = 1.0 / (m + 1) + (1.0 - dfs(m - 1, n)) * m / (m + 1);
  double p = (d - c) / (a - b - c + d);
  return f[n][m] = p * a + (1.0 - p) * c;
}
int main() {
  scanf("%d%d", &n, &m);
  dfs(n, m);
  printf("%.9lf %.9lf", f[n][m], 1.0 - f[n][m]);
}
