#include <bits/stdc++.h>
using namespace std;
long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (!isdigit(ch)) {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (isdigit(ch)) {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
double g[1005][1005];
int n, m, vis[1005][1005];
double f(int n, int m) {
  if (g[n][m]) return g[n][m];
  if (!n) return 1.0 / (m + 1);
  if (!m) return 1.0;
  double k1 = 1.0 * m / (m + 1) * (1.0 - f(m - 1, n)) - 1.0;
  double k2 = 1.0 / (m + 1) + 1.0 * m / (m + 1) * (1.0 - f(m - 1, n)) +
              f(m, n - 1) - 1.0;
  double b1 = 1.0;
  double b2 = 1.0 - f(m, n - 1);
  double x = 1.0 * (b2 - b1) / (k1 - k2);
  return g[n][m] = 1.0 * k1 * x + b1;
}
int main() {
  n = read();
  m = read();
  for (int i = 0; i <= n; i++)
    for (int j = 0; j <= m; j++) vis[i][j] = 0;
  printf("%.10lf %.10lf\n", f(n, m), 1 - f(n, m));
  return 0;
}
