#include <bits/stdc++.h>
using namespace std;
int main() {
  long long n, m, a, s, k;
  cin >> n >> k;
  if (n > k) {
    cout << k << " ";
    cout << (n - k) / 2;
  } else {
    cout << n << " ";
    cout << (k - n) / 2;
  }
}
