#include <bits/stdc++.h>
using namespace std;
int m, n;
double f[1005][1005];
int vis[1005][1005];
inline int read() {
  int x = 0, f = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') f = -1;
    ch = getchar();
    if (ch == -1) return 0;
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
inline void write(int x) {
  if (x < 0) {
    putchar('-');
    x = -x;
  }
  if (x >= 10) write(x / 10);
  putchar(x % 10 + '0');
}
double dfs(int m, int n) {
  if (!m) return 1.0 / (n + 1);
  if (!n) return 1;
  if (vis[m][n]) return f[m][n];
  vis[m][n] = 1;
  return f[m][n] = 1 / (1 + 1.0 / (dfs(n, m - 1) * (n + 1))) * n / (n + 1) *
                       (1 - dfs(n - 1, m)) +
                   1 - 1 / (1 + 1.0 / (dfs(n, m - 1) * (n + 1)));
}
signed main() {
  m = read(), n = read();
  printf("%.10lf %.10lf\n", dfs(m, n), 1 - dfs(m, n));
  return 0;
}
