#include <bits/stdc++.h>
int m, n;
double f[1111][1111], p;
bool vis[1111][1111];
double F(int m, int n) {
  if (!m) return 1.0 / (n + 1);
  if (!n) return 1;
  if (vis[m][n]) return f[m][n];
  vis[m][n] = true;
  double p = 1 / (1 + (1. / ((n + 1) * F(n, m - 1))));
  return f[m][n] = p * n / (n + 1) * (1 - F(n - 1, m)) + 1 - p;
}
int main() {
  scanf("%d%d", &m, &n);
  p = F(m, n);
  printf("%.11f %.11f\n", p, 1 - p);
}
