#include <bits/stdc++.h>
using namespace std;
inline long long read() {
  long long x = 0, f = 1;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') f = -1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9') {
    x = x * 10 + ch - '0';
    ch = getchar();
  }
  return x * f;
}
const long long N = 1010;
double f[N][N];
inline double dp(long long m, long long n) {
  if (n == 0) return 1;
  if (m == 0) return 1.0 / (n + 1);
  if (f[m][n] <= 1) return f[m][n];
  double play_check = n * 1.0 / (n + 1) * (1 - dp(n - 1, m));
  double play_moveon = 1.0 / (n + 1) + n * 1.0 / (n + 1) * (1 - dp(n - 1, m));
  double trick_check = 1;
  double trick_moveon = 1 - dp(n, m - 1);
  double P = dp(n, m - 1) / (dp(n, m - 1) + 1.0 / (n + 1));
  return f[m][n] = P * play_moveon + (1 - P) * trick_moveon;
  return f[m][n] = P * play_check + (1 - P) * trick_check;
}
int main() {
  long long m = read(), n = read();
  for (long long i = (1); i <= (1000); ++i)
    for (long long j = (1); j <= (1000); ++j) f[i][j] = 2.0;
  printf("%.11f %.11f\n", dp(m, n), 1.0 - dp(m, n));
}
