#include <bits/stdc++.h>
using namespace std;
const int maxn = 1007;
int n, m;
double f[maxn][maxn];
double F(int n, int m) {
  if (f[n][m] > 0) return f[n][m];
  if (n == 0 || m == 0) return f[n][m] = 1.0 / (m + 1);
  double A = 1.0 * m / (m + 1) * (1.0 - F(m - 1, n)), B = A + 1.0 / (m + 1),
         C = 1.0, D = 1.0 - F(m, n - 1);
  double p = (D - C) / (A - C - B + D);
  return f[n][m] = p * A + (1.0 - p) * C;
}
void work() {
  for (int i = 0; i <= max(n, m); i++)
    for (int j = 0; j <= max(n, m); j++) f[i][j] = -1;
  double res = F(n, m);
  printf("%.15f %.15f\n", res, 1 - res);
}
int main() {
  while (scanf("%d%d", &n, &m) != EOF) work();
}
