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