#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, x, y, c = 0;
  cin >> x >> y;
  if (x > y) {
    cout << y << " ";
  } else
    cout << x << " ";
  if (x < y) swap(x, y);
  if (x - y > 0) {
    cout << (x - y) / 2 << " ";
  } else
    cout << "0"
         << " ";
  cout << endl;
}
