#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int x = 0, f = 1, c = getchar();
  while (c < 48) c == '-' && (f = -1), c = getchar();
  while (c > 47) x = x * 10 + c - '0', c = getchar();
  return x * f;
}
const int MAXN = 1005;
double dp[MAXN][MAXN];
int n, m;
inline double dfs(int n, int m) {
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1.0;
  if (dp[n][m]) return dp[n][m];
  double la = 1.0 * m / (m + 1) * (1.0 - dfs(m - 1, n)), lb = 1.0;
  double lc = 1.0 / (m + 1) + la, ld = 1.0 - dfs(m, n - 1);
  double lp = (ld - lb) / (la - lb - lc + ld);
  return dp[n][m] = lp * la + (1 - lp) * lb;
}
int main(int argc, char const *argv[]) {
  n = read();
  m = read();
  printf("%.10lf %.10lf\n", dfs(n, m), 1 - dfs(n, m));
  return 0;
}
