#include <bits/stdc++.h>
using namespace std;
const int N = 1010;
long double F[N][N];
int vis[N][N];
long double f(int n, int m) {
  if (!n) return (long double)1 / (m + 1);
  if (!m) return 1;
  if (vis[n][m]) return F[n][m];
  long double k1 = (long double)m / (m + 1) * (1 - f(m - 1, n)) - 1;
  long double b1 = 1;
  long double k2 =
      (long double)(1 + m * (1 - f(m - 1, n))) / (m + 1) - (1 - f(m, n - 1));
  long double b2 = 1 - f(m, n - 1);
  long double X = (b2 - b1) / (k1 - k2);
  vis[n][m] = 1;
  return F[n][m] = k1 * X + b1;
}
int main() {
  int n, m;
  cin >> n >> m;
  long double ans = f(n, m);
  cout << fixed << setprecision(10) << ans << ' ' << (1 - ans) << endl;
}
