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