#include <bits/stdc++.h>
using namespace std;
int min(int a, int b) { return a < b ? a : b; }
int max(int a, int b) { return a > b ? a : b; }
int read() {
  int x = 0, w = 1;
  char ch = getchar();
  while (ch > '9' || ch < '0') {
    if (ch == '-') w = -1;
    ch = getchar();
  }
  while (ch <= '9' && ch >= '0') x = x * 10 + ch - '0', ch = getchar();
  return x * w;
}
const int N = 1010;
int n, m;
double f[N][N];
double dfs(int n, int m) {
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1.0;
  if (f[n][m]) return f[n][m];
  double A = 1.0 * m / (m + 1.0) * (1.0 - dfs(m - 1, n)), B = 1.0;
  double C = 1.0 / (m + 1.0) + A, D = 1.0 - dfs(m, n - 1);
  double P = (D - B) / (A - B - C + D);
  return f[n][m] = P * A + (1 - P) * B;
}
int main() {
  n = read();
  m = read();
  double ans = dfs(n, m);
  printf("%.10lf %.10lf", ans, 1.0 - ans);
}
