#include <bits/stdc++.h>
using namespace std;
double dp[1005][1005];
double dfs(int n, int m) {
  if (dp[n][m] >= -1e-9) return dp[n][m];
  if (n == 0) return dp[n][m] = 1.0 / (1.0 + m);
  if (m == 0) return dp[n][m] = 1.0;
  double a[4];
  a[0] = 1.0 * m / (1.0 + m) * (1.0 - dfs(m - 1, n));
  a[1] = a[0] + 1.0 / (1.0 + m);
  a[2] = 1.0;
  a[3] = 1.0 - dfs(m, n - 1);
  double p = (a[3] - a[2]) / (a[0] - a[2] - a[1] + a[3]);
  return dp[n][m] = p * a[0] + (1.0 - p) * a[2];
}
int main() {
  for (int i = 0; i < 1005; i++) {
    for (int j = 0; j < 1005; j++) {
      dp[i][j] = -1;
    }
  }
  int n, m;
  cin >> n >> m;
  printf("%.9lf %.9lf", dfs(n, m), 1 - dfs(n, m));
  return 0;
}
