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