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