#include <bits/stdc++.h>
using namespace std;
bool bo[1005][1005];
double ans[1005][1005];
double f(int n, int m) {
  if (m == 0) return 1;
  if (bo[n][m]) return ans[n][m];
  if (n == 0) {
    return 1.0 / (m + 1);
  }
  double a = 1.0, b = 1 - f(m, n - 1);
  double c = 1.0 * m / (m + 1) * (1 - f(m - 1, n)), d = 1.0 / (m + 1) + c;
  double p = (d - c) / (a - c + d - b);
  bo[n][m] = true;
  return ans[n][m] = p * a + (1 - p) * c;
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  double x = f(n, m);
  printf("%.10f %.10f", x, 1 - x);
}
