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