#include <bits/stdc++.h>
using namespace std;
inline int read() {
  int X = 0, w = 1;
  char c = getchar();
  while (c < '0' || c > '9') {
    if (c == '-') w = -1;
    c = getchar();
  }
  while (c >= '0' && c <= '9') X = X * 10 + c - '0', c = getchar();
  return X * w;
}
const int N = 1000 + 10;
int n, m;
double dp[N][N];
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 A = 1.0 * m / (m + 1) * (1.0 - dfs(m - 1, n)), B = 1.0;
  double C = 1.0 / (m + 1) + A, D = 1.0 - dfs(m, n - 1);
  double P = (D - B) / (A - B - C + D);
  return dp[n][m] = P * A + (1 - P) * B;
}
int main() {
  n = read(), m = read();
  printf("%.10lf %.10lf\n", dfs(n, m), 1 - dfs(n, m));
  return 0;
}
