#include <bits/stdc++.h>
using namespace std;
template <class T>
inline void Read(T &x) {
  int f = 1;
  char t = getchar();
  while (t < '0' || t > '9') {
    if (t == '-') f = -1;
    t = getchar();
  }
  x = 0;
  while (t >= '0' && t <= '9') {
    x = x * 10 + t - '0';
    t = getchar();
  }
  x *= f;
}
template <class T>
inline void chkmax(T &x, T y) {
  if (x < y) x = y;
}
template <class T>
inline void chkmin(T &x, T y) {
  if (x > y) x = y;
}
const int maxn = 1005;
int n;
int m;
double f[maxn][maxn];
void input() {
  Read(n);
  Read(m);
}
double dfs(int n, int m) {
  if (f[n][m] > -0.5) return f[n][m];
  if (n == 0) return f[n][m] = 1.0 / (m + 1);
  if (m == 0) return f[n][m] = 1.0;
  double A = 1.0;
  double B = 1.0 - dfs(m, n - 1);
  double C = (1.0 * m / (m + 1)) * (1.0 - dfs(m - 1, n));
  double D = 1.0 / (m + 1) + (1.0 * m / (m + 1)) * (1.0 - dfs(m - 1, n));
  double P = (D - C) / (A - B - C + D);
  return f[n][m] = P * A + (1.0 - P) * C;
}
void solve() {
  memset(f, -1, sizeof(f));
  printf("%.16f %.16f\n", dfs(n, m), 1 - dfs(n, m));
}
int main() {
  input();
  solve();
  return 0;
}
