#include <bits/stdc++.h>
using namespace std;
int m, n;
bool vis[1010][1010];
double ans, dp[1010][1010];
double dfs(int m, int n) {
  if (vis[m][n]) return dp[m][n];
  dp[m][n] = 0;
  vis[m][n] = 1;
  if (m == 0) {
    dp[m][n] = 1.0 / (n + 1);
    return dp[m][n];
  }
  if (n == 0) {
    dp[m][n] = 1.0;
    return dp[m][n];
  }
  double A, B, C, D, p;
  A = n * 1.0 / (n + 1) * (1.0 - dfs(n - 1, m));
  B = 1.0;
  C = 1.0 / (n + 1) + n * 1.0 / (n + 1) * (1 - dfs(n - 1, m));
  D = 1.0 - dfs(n, m - 1);
  p = (B - D) / (B + C - A - D);
  dp[m][n] = p * A + (1.0 - p) * B;
  return dp[m][n];
}
int main() {
  scanf("%d%d", &m, &n);
  ans = dfs(m, n);
  printf("%.10lf %.10lf\n", ans, 1 - ans);
  return 0;
}
