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