#include <bits/stdc++.h>
using namespace std;
int main() {
  int r, b, mi, diff, mx;
  cin >> r >> b;
  mi = min(r, b);
  mx = max(r, b);
  cout << mi << " ";
  diff = mx - mi;
  cout << diff / 2 << endl;
  return 0;
}
