#include <bits/stdc++.h>
using namespace std;
double f[1010][1010];
bool vis[1010][1010];
double dfs(int n, int m) {
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1;
  if (vis[n][m]) return f[n][m];
  vis[n][m] = true;
  double A = 1.0, 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) + C;
  double x = (D - C) / (A - B - C + D);
  return f[n][m] = A * x + C * (1.0 - x);
}
int main() {
  int n, m;
  scanf("%d%d", &n, &m);
  double ans = dfs(n, m);
  printf("%.10lf %.10lf\n", ans, 1.0 - ans);
  return 0;
}
