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