#include <bits/stdc++.h>
using namespace std;
const int maxn = 1010;
double dp[maxn][maxn];
int n, m;
double calc(double i, double j) { return i / j; }
double f(int n, int m) {
  if (m == 0) return dp[n][m] = 1.0;
  if (n == 0) return dp[n][m] = calc(1, m + 1);
  if (dp[n][m] > 1e-9) return dp[n][m];
  double p = calc(calc(m, m + 1) * f(m - 1, n) - f(m, n - 1),
                  calc(m, m + 1) - 1.0 - f(m, n - 1));
  return dp[n][m] = p + (1.0 - p) * (1 - f(m, n - 1));
}
int main() {
  for (int i = 0; i < maxn; ++i)
    for (int j = 0; j < maxn; ++j) dp[i][j] = 0;
  scanf("%d%d", &n, &m);
  printf("%.11lf %.11lf\n", f(n, m), 1 - f(n, m));
  return 0;
}
