#include <bits/stdc++.h>
using namespace std;
template <typename T>
inline void red(T &x) {
  x = 0;
  bool fg = 0;
  char ch = getchar();
  while (ch < '0' || ch > '9') {
    if (ch == '-') fg ^= 1;
    ch = getchar();
  }
  while (ch >= '0' && ch <= '9')
    x = (x << 1) + (x << 3) + (T)(ch ^ 48), ch = getchar();
  if (fg) x = -x;
}
template <typename T>
bool umax(T &x, T y) {
  return (x < y) ? (x = y, true) : (false);
}
template <typename T>
bool umin(T &x, T y) {
  return (x > y) ? (x = y, true) : (false);
}
const int N = 1005;
int n, m;
double dp[N][N];
double DFS(int n, int m) {
  if (dp[n][m] >= 0) return dp[n][m];
  if (n == 0) return dp[n][m] = 1.0 / (m + 1);
  if (m == 0) return dp[n][m] = 1.0;
  double A = 1.0 - DFS(m, n - 1), B = 1.0,
         C = 1.0 * m / (m + 1.0) * (1.0 - DFS(m - 1, n)),
         D = C + 1.0 / (m + 1.0);
  double p = (C - D) / (A - D - B + C);
  return dp[n][m] = A * p + (1.0 - p) * D;
}
int main() {
  cin >> n >> m;
  for (int i = 0; i <= max(n, m); i++)
    for (int j = 0; j <= max(n, m); j++) dp[i][j] = -1;
  printf("%.9lf %.9lf\n", DFS(n, m), 1.0 - DFS(n, m));
  return 0;
}
