#include <bits/stdc++.h>
using namespace std;
int n, m;
double f[1005][1005];
double get(int n, int m) {
  if (!m) return 1.0;
  if (!n) return 1.0 / (m + 1);
  if (f[n][m]) return f[n][m];
  double A = (1 - get(m - 1, n)) * m / (m + 1);
  double B = (1 - get(m - 1, n)) * m / (m + 1) + 1.0 / (m + 1);
  double C = 1.0, D = 1.0 - get(m, n - 1);
  double p = (D - C) / ((A - C) - (B - D));
  return f[n][m] = p * A + 1.0 - p;
}
int main() {
  scanf("%d%d", &n, &m);
  printf("%.12lf %.12lf", get(n, m), 1.0 - get(n, m));
  return 0;
}
