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