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