#include <bits/stdc++.h>
using db = double;
db f[1007][10007];
db cal(int n, int m) {
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1.0;
  if (f[n][m]) return f[n][m];
  db A = (1 - cal(m - 1, n)) * m / (m + 1);
  db B = (1 - cal(m - 1, n)) * m / (m + 1) + 1.0 / (m + 1);
  db C = 1 - cal(m, n - 1);
  db p = (C - 1) / ((A - 1) - (B - C));
  return f[n][m] = p * A + (1 - p);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m), printf("%.10lf %.10lf", cal(n, m), 1 - cal(n, m));
}
