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