#include <bits/stdc++.h>
using namespace std;
const int N = 1005;
double f[N][N];
double dfs(int n, int m) {
  if (f[n][m] >= 0) return f[n][m];
  if (n == 0) return f[n][m] = 1.0 / (m + 1);
  if (m == 0) return f[n][m] = 1;
  double p = 1.0 / (dfs(m, n - 1) * (m + 1) + 1);
  return f[n][m] = p + (1 - p) * m / (m + 1) * (1 - dfs(m - 1, n));
}
int main() {
  int n, m;
  cin >> n >> m;
  for (int i = 0; i < N; ++i) {
    for (int j = 0; j < N; ++j) {
      f[i][j] = -1;
    }
  }
  double s = dfs(n, m);
  printf("%.12f %.12f\n", s, 1 - s);
  return 0;
}
