#include <bits/stdc++.h>
using namespace std;
int n, m;
double f[1010][1010];
double Ans;
inline double F(int n, int m) {
  double A = 0, B = 0, C = 0, P = 0;
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1;
  if (f[n][m]) return f[n][m];
  A = 1.0 * m / (m + 1) * (1 - F(m - 1, n));
  B = 1.0 / (m + 1) + 1.0 * m / (m + 1) * (1 - F(m - 1, n)) + F(m, n - 1);
  C = -F(m, n - 1);
  P = C / (A - B);
  return f[n][m] = P * A + (1 - P);
}
int main() {
  scanf("%d%d", &m, &n);
  Ans = F(m, n);
  printf("%.10lf %.10lf\n", Ans, 1 - Ans);
  return 0;
}
