#include <bits/stdc++.h>
using namespace std;
int n, m;
double f[1010][1010];
inline int rd() {
  int x = 0;
  char ch = getchar();
  for (; ch < '0' || ch > '9'; ch = getchar())
    ;
  for (; ch >= '0' && ch <= '9'; ch = getchar()) x = x * 10 + ch - '0';
  return x;
}
inline double gao(int n, int m) {
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1.0;
  if (f[n][m]) return f[n][m];
  double h1 = (1.0 - gao(m - 1, n)) * m / (m + 1),
         h2 = (1.0 - gao(m - 1, n)) * m / (m + 1) + 1.0 / (m + 1);
  double h3 = 1.0, h4 = 1.0 - gao(m, n - 1);
  double hh = (h4 - h3) / (h1 - h2 + h4 - h3);
  return f[n][m] = max(1.0 / (m + 1), h1 * hh + h3 * (1.0 - hh));
}
int main() {
  n = rd();
  m = rd();
  printf("%.10lf %.10lf\n", gao(n, m), 1.0 - gao(n, m));
  return 0;
}
