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