#include <bits/stdc++.h>
using namespace std;
namespace io {
const int L = (1 << 19) + 1;
char ibuf[L], *iS, *iT, obuf[L], *oS = obuf, *oT = obuf + L - 1, c, st[55];
int f, tp;
char gc() {
  if (iS == iT) {
    iT = (iS = ibuf) + fread(ibuf, 1, L, stdin);
    return iS == iT ? EOF : *iS++;
  }
  return *iS++;
}
template <class I>
void gi(I& x) {
  for (f = 1, c = gc(); c < '0' || c > '9'; c = gc())
    if (c == '-') f = -1;
  for (x = 0; c <= '9' && c >= '0'; c = gc()) x = x * 10 + (c & 15);
  x *= f;
}
};  // namespace io
using io::gc;
using io::gi;
double f[1010][1010], a, b, c, p;
int n, m, l;
void dfs(int n, int m) {
  if (f[n][m] > -0.5) return;
  dfs(m - 1, n);
  dfs(m, n - 1);
  a = m * 1.0 / (m + 1) * (1 - f[m - 1][n]);
  b = 1.0 / (m + 1);
  c = f[m][n - 1];
  p = b / (c + b);
  f[n][m] = (1 - a) * p + a;
}
int main() {
  gi(n);
  gi(m);
  l = max(n, m);
  for (register int i = 0; i <= l; i++) f[i][0] = 1;
  for (register int i = 1; i <= l; i++) f[0][i] = 1.0 / (i + 1);
  for (register int i = 1; i <= l; i++)
    for (register int j = 1; j <= l; j++) f[i][j] = -1;
  dfs(n, m);
  printf("%.10lf %.10lf\n", f[n][m], 1 - f[n][m]);
  return 0;
}
