#include <bits/stdc++.h>
using namespace std;
int main() {
  int m;
  cin >> m;
  int n;
  cin >> n;
  if (m == n) {
    cout << m << " "
         << "0";
    return 0;
  } else {
    int b = max(m, n);
    int c = min(m, n);
    int x = b - c;
    int z = x / 2;
    cout << c << " " << z << endl;
    return 0;
  }
}
