#include <bits/stdc++.h>
using namespace std;
int main() {
  int a, b;
  cin >> a >> b;
  int res1, res2;
  if (a <= b) {
    res1 = a;
    b -= a;
    res2 = b / 2;
  } else {
    res1 = b;
    a -= b;
    res2 = a / 2;
  }
  cout << res1 << ' ' << res2 << endl;
}
