#include <bits/stdc++.h>
using namespace std;
int vis[1005][1005];
double dp[1005][1005];
double solve(int n, int m) {
  if (vis[n][m]) return dp[n][m];
  vis[n][m] = 1;
  if (!m)
    dp[n][m] = 1;
  else if (!n)
    dp[n][m] = 1 / (double)(m + 1);
  else {
    double a = 1 - solve(m, n - 1),
           b = (1 + m * (1 - solve(m - 1, n))) / (double)(m + 1);
    double c = 1, d = m / (double)(m + 1) * (1 - solve(m - 1, n));
    if (b - a == d - c) {
      if (a < c)
        dp[n][m] = b > a ? b : a;
      else
        dp[n][m] = d > c ? d : c;
    } else {
      double p = (c - a) / (b - a - d + c);
      dp[n][m] = (b - a) * p + a;
    }
  }
  return dp[n][m];
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  double tmp = solve(n, m);
  printf("%.10f %.10f", tmp, 1 - tmp);
  return 0;
}
