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