#include <bits/stdc++.h>
using namespace std;
void solve() {
  int a, b;
  cin >> a >> b;
  int m = min(a, b);
  cout << m << " ";
  if ((a - m))
    cout << (a - m) / 2;
  else
    cout << (b - m) / 2;
};
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  solve();
}
