#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b, d, e, c;
  cin >> a >> b;
  if (a > b) {
    d = b;
    e = a - b;
    c = (e / 2);
  } else if (b > a) {
    d = a;
    e = b - a;
    c = (e / 2);
  } else {
    d = b;
    c = 0;
  }
  cout << d << " " << c << endl;
  return 0;
}
