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