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