#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b;
  cin >> a >> b;
  int c = min(a, b);
  a = max(a, b) - c;
  cout << c << " " << a / 2;
  ;
}
int main() {
  int count = 1;
  while (count--) {
    solve();
  }
  return 0;
}
