#include <bits/stdc++.h>
using namespace std;
int main() {
  ios::sync_with_stdio(0);
  cin.tie(0);
  cout.tie(0);
  long long cnt = 0, temp, x, y, z, ar[100005], t, i = 0, j = 0, printf = 0, m,
            n, a, b, ans = 0;
  double jj;
  string ss;
  cin >> x >> y;
  cout << min(x, y) << " " << abs(x - y) / 2 << endl;
  return 0;
}
