#include <bits/stdc++.h>
using namespace std;
void FastIO() {
  ios_base::sync_with_stdio(false);
  cin.tie(0);
  cout.precision(20);
}
int main() {
  FastIO();
  int A, B;
  while (cin >> A >> B) {
    int M = min(A, B);
    int N = max(A - M, B - M);
    cout << M << " " << N / 2 << endl;
  }
  return 0;
  return 0;
}
