#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, k = 0, k1 = 0, temp;
  cin >> a >> b;
  if (a < b) {
    temp = a;
    a = b;
    b = temp;
  }
  temp = a + b;
  while (b != 0) {
    temp = temp - 2;
    k++;
    b--;
  }
  k1 = temp / 2;
  cout << k << ' ' << k1 << endl;
  return 0;
}
