#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long s = 0, w = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') s = s * 10 + ch - '0', ch = getchar();
  return s * w;
}
double f[1010][1010];
double dfs(long long n, long long m) {
  if (n == 0) return 1.0 / (1 + m);
  if (m == 0) return 1.0;
  if (f[n][m] > 1e-8) return f[n][m];
  double A = 1.0 * m / (m + 1) * (1.0 - dfs(m - 1, n));
  double B = 1.0 / (m + 1) + 1.0 * m / (m + 1) * (1.0 - dfs(m - 1, n));
  double C = 1.0;
  double D = 1.0 - dfs(m, n - 1);
  double p = (D - C) / (A - B - C + D);
  return f[n][m] = A * p + 1 - p;
}
signed main() {
  long long n = read(), m = read();
  double ans = dfs(n, m);
  printf("%.10lf %.10lf", ans, 1.0 - ans);
  return 0;
}
