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