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