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