#include <bits/stdc++.h>
using namespace std;
double f[1010][1010];
int n, m, v[1010][1010];
inline double Dp(int n, int m) {
  if (!m) return (1.);
  if (!n) return (1. / (double)(m + 1));
  if (v[n][m]) return (f[n][m]);
  double M = (double)m / (m + 1.);
  double A = M * (1. - Dp(m - 1, n)) - 1., B = 1.;
  double C = M * (1. - Dp(m - 1, n)) + (1. - M) - (1. - Dp(m, n - 1)),
         D = (1. - Dp(m, n - 1));
  double p = (D - B) / (A - C);
  v[n][m] = 1, f[n][m] = p * A + B;
  return (f[n][m]);
}
int main() {
  scanf("%d%d", &n, &m);
  printf("%.9lf %.9lf\n", Dp(n, m), 1. - Dp(n, m));
}
