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