#include <bits/stdc++.h>
using namespace std;
long long memo[150];
long long fibo_memorisation(long long n) {
  if (n <= 1) return n;
  if (memo[n] != -1) return memo[n];
  return memo[n] = fibo_memorisation(n - 1) + fibo_memorisation(n - 2);
}
long long fib[150];
long long fibo_Bottom_up(int n) {
  if (fib[n] != -1) return fib[n];
  fib[0] = 0, fib[1] = 1;
  for (int i = 2; i <= n; i++) fib[i] = fib[i - 1] + fib[i - 2];
  return fib[n];
}
int main() {
  long long a, b, s = 0, c = 0;
  cin >> a >> b;
  s = min(a, b);
  if (a > b)
    c = (a - b) / 2;
  else
    c = (b - a) / 2;
  cout << s << " " << c;
}
