#include <bits/stdc++.h>
using namespace std;
long long int i, j, k, n, m, q, t, a, b, cnt, sum, tot;
int main() {
  ios_base::sync_with_stdio(false);
  cin.tie(NULL);
  cout.tie(NULL);
  ;
  cin >> n >> m;
  a = min(n, m);
  if (a == m)
    cout << a << " " << (n - a) / 2;
  else
    cout << a << " " << (m - a) / 2;
  return 0;
}
