#include <bits/stdc++.h>
using namespace std;
int main() {
  int n, i, j, k = 0;
  cin >> i >> j;
  if (i > j)
    n = j;
  else
    n = i;
  i = i - n;
  j = j - n;
  cout << n << " ";
  if (i > 0) {
    i = i / 2;
    cout << i;
  } else {
    j = j / 2;
    cout << j;
  }
  return 0;
}
