#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1010;
const int INF = 2e9;
const double eps = 1e-6;
const double PI = acos(-1);
int n, m;
double dp[MAXN][MAXN], Ans;
template <typename T>
inline bool read(T &a) {
  a = 0;
  char c = getchar();
  int f = 1;
  while (c < '0' || c > '9') {
    if (c == '-') f = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') {
    a = a * 10 + (c ^ 48);
    c = getchar();
  }
  return a *= f, true;
}
template <typename A, typename... B>
inline bool read(A &x, B &...y) {
  return read(x) && read(y...);
}
double DP(int x, int y) {
  if (!y) return 1;
  if (!x) return 1. / (y + 1);
  if (dp[x][y]) return dp[x][y];
  double A = 1. * (1 - DP(y - 1, x)) * y / (y + 1);
  double B = 1. / (y + 1) + 1. * y / (y + 1) * (1 - DP(y - 1, x));
  double C = 1.;
  double D = 1 - DP(y, x - 1);
  double p = (D - C) / (A - C - B + D);
  dp[x][y] = p * A + (1 - p) * C;
  return dp[x][y];
}
signed main() {
  read(n), read(m);
  Ans = DP(n, m);
  printf("%.10lf %.10lf\n", Ans, 1 - Ans);
  return 0;
}
