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