#include <bits/stdc++.h>
const int N = 1010;
double f[N][N];
bool vis[N][N];
inline double F(int m, int n) {
  if (!m) return 1. / (n + 1);
  if (!n) return 1;
  if (vis[m][n]) return f[m][n];
  vis[m][n] = true;
  double p = 1 / (1 + (1. / ((n + 1) * F(n, m - 1))));
  return f[m][n] = p * n / (n + 1) * (1 - F(n - 1, m)) + 1 - p;
}
int main() {
  int m, n;
  scanf("%d%d", &m, &n);
  printf("%.11f %.11f\n", F(m, n), 1 - F(m, n));
  return 0;
}
