#include <bits/stdc++.h>
using namespace std;
const int MAXN = 1005;
bool Walk[MAXN][MAXN];
double F[MAXN][MAXN];
int N, M;
void Dfs(int n, int m) {
  if (Walk[n][m]) return;
  Walk[n][m] = 1;
  if (n == 0 || m == 0)
    F[n][m] = (1.0 / (m + 1));
  else {
    Dfs(m - 1, n), Dfs(m, n - 1);
    double x, y, x1, y1;
    x = m / (m + 1.0) * (1 - F[m - 1][n]) - 1, y = 1;
    x1 = m / (m + 1.0) * (1 - F[m - 1][n]) + 1.0 / (m + 1) + (F[m][n - 1] - 1),
    y1 = 1 - F[m][n - 1];
    double a = (y1 - y) / (x - x1);
    F[n][m] = a * x1 + y1;
  }
}
int main() {
  scanf("%d%d", &N, &M);
  Dfs(N, M);
  printf("%.10f %.10f\n", F[N][M], 1 - F[N][M]);
  return 0;
}
