#include <bits/stdc++.h>
using namespace std;
int32_t main() {
  ios::sync_with_stdio(false);
  cin.tie(nullptr);
  cout.tie(nullptr);
  int n, m;
  cin >> n >> m;
  vector<vector<double>> dp(max(n, m) + 1, vector<double>(max(n, m) + 1, 0));
  for (int i = 0; i <= max(n, m); i++) {
    dp[i][0] = 1;
    dp[0][i] = 1.0 / (i + 1);
  }
  function<double(int, int)> dfs = [&](int n, int m) {
    if (dp[n][m] > 0) {
      return dp[n][m];
    }
    double a = 1.0 * m * (1 - dfs(m - 1, n)) / (m + 1);
    double b = 1.0 / (m + 1) + m * (1 - dfs(m - 1, n)) / (m + 1);
    double c = 1.0;
    double d = 1.0 - dfs(m, n - 1);
    double p = (d - c) / (a - c - b + d);
    return dp[n][m] = p * a + (1 - p) * c;
  };
  double res = dfs(n, m);
  cout << fixed << setprecision(12) << res << ' ' << 1 - res;
  return 0;
}
