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